[magnolia-user] Re: Custom model class not working in STK extension template

2014-04-05 Thread Ravi Singh (via Magnolia Forums)
HI Paul, I'm facing something similar as I started experimenting with Magnolia recently. In my custom model class which extends does not seem to work even though ${model} spits out my class name. I was expecting that my model "execute" method will work but its not. Can you help? Thanks a to

[magnolia-user] Re: Custom model class not working in STK extension template

2012-10-12 Thread Paul Shuttlewood (via Magnolia Forums)
Thanks for that explanation of that. I had indeed moved from page templates (using ${model}) in a standalone website, to using extended STK templates where I now provide a component template. -- Context is everything: http://forum.magnolia-cms.com/forum/thread.html?threadId=b9ae22ff-6b27-46b8-

[magnolia-user] Re: Custom model class not working in STK extension template

2012-10-11 Thread Jan Haderka (via Magnolia Forums)
Actually ${model} always points to the model associated w/ current object (page, area, component) ${model.parent} always points to the model associated w/ parent page (IIRC) so if you defined your model at the page level, but access it from template rendering component on the page, you indeed n

[magnolia-user] Re: Custom model class not working in STK extension template

2012-10-11 Thread Paul Shuttlewood (via Magnolia Forums)
Resolved this problem now. Seems that when using a modelClass with STK you need to specify ${model.parent.state} instead of ${model.state} to access your data model. -- Context is everything: http://forum.magnolia-cms.com/forum/thread.html?threadId=b9ae22ff-6b27-46b8-8a93-25a0673b58ee --