Jozef Chocholáček wrote:

> [quote]I think you could create your own page model class that loads the 
> produc, and get the product data from that model class for both the header 
> template and the component elsewhere on the page.[/quote]
> 
> That would be enough if I had just one (or few) such dynamic pages, but I'd 
> like to have a more general solution. I think the filter is the best option.

You could create a common super class for those page model classes, so all 
templates that use a page model that inherits from that super class can access 
the product data from the model. That's actually what we use do ourselves, as 
we have the same use case (only for media instead of products).

I'd say using page models is a more general solution as you can use rich Java 
objects to represent your products, instead of a bunch of strings, but of 
course it's up to you what you like best.

Nils.

----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <user-list-unsubscr...@magnolia-cms.com>
----------------------------------------------------------------

Reply via email to