Hi Richard,
You can specify the model class to use for resources in the "advanced" tab of
the edit dialog of your resource.
Since you haven't seen this, but found out other, more complicated solutions:
do you have any suggestion on how to make this more obvious? Where would have
looked first ?
Cheers,
-g
On Jul 21, 2010, at 14:56, Unger, Richard wrote:
> Hi!
>
> We’re trying to use a „Processed CSS“ template, and want to access the “site”
> definition from within the freemarker code.
>
> - In our own theme, our own CSS file, writing ${model.site} results
> in an exception (model.site is undeclared)
> - In the “pop” theme in “styles.css”, the same code works fine.
>
> It would seem that the difference is that in our own css, model is a
> “info.magnolia.module.templating.RenderingModelImpl”, which does not have the
> “getSite()” method.
> In the pop theme styles.css template, the model is a
> “info.magnolia.module.templatingkit.resources.STKResourceModel”, which
> provides the “getSite()” method.
>
> How to deal with this problem?
>
> More specifically, how can I set the modelClass on a CSS template?
>
> I have 2 ideas for solving this:
> - When creating a new css, always copy the “styles.css” node, rather
> than using the “New Item” function.
> - Use a JCR-Browser to access the “resources” repository and
> manually create the modelClass property.
>
> Would you recommend one method over the other?
> Are there any plans to make the modelClass and other “hidden” properties of
> CSS templates editable using the normal GUI?
>
> Thank you for your advice!
>
> Regards from Vienna,
>
> Richard Unger
>
>
>
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/home/community/mailing-lists.html
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------