Jump to content

fields


Oleg
 Share

Recommended Posts

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"?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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?
Link to comment
Share on other sites

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
 Share

×
×
  • Create New...