Jump to content

Recommended Posts

Posted
I have such a structure of the site:

Сategories

-Сategory

Brands

-Brand

--product

Template "category" contains a field "categorytype". Field type "page".

Template "product" contains other fields (size, color ...).

How in the template "product" print the value of the field "categorytype"?

Posted (edited)

Hi, Oleg! Try this:

$page->category->categorytype->title;

I assume that you got a pagefield named "category" on you product page pointing at the category.

Edit: And you should name a topic something more explicit tham just "fields".

Edited by Ivan Gretsky
  • Like 1
Posted

I moved "categorytype" field to the "brand" template. And now I want to display "categorytype" field in "product" template. 

It should look something like this:
$page->brand->categorytype->title;

or

$page->brand->categorytype
  But where I am wrong?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...