Hi,
You could subclass the class info.magnolia.freemarker.FreemarkerHelper.java and
add in the method
'protected void addDefaultData(Map data, Locale locale, String i18nBasename)
{...'
your Object you want to provide.
Or you could subclass the class
info.magnolia.module.templatingkit.renderers.STKParagraphRenderer.java
and overwrite the method 'protected void setupContext(Map ctx,
Content content,
RenderableDefinition definition,
RenderingModel state,
Object actionResult) {...'
and add there the object to the context (ctx.put("myObject",
MyObjectClass.INSTANCE);)
Cheers
Christian
On Feb 2, 2010, at 11:53 AM, Nils Breunese wrote:
>
> Christian Ringele wrote:
>
>> If you don't wan't to add extra a model class just for this method,
>> you could build your own util class and make it available to
>> freemarker (as stk object). Then you would have this method always
>> available, anywhere you need the content node by a uuid.
>
> I don't need this at the moment, but I'm interested in how exactly one makes
> a class available to FreeMarker so it is always available.
>
> Nils.
>
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/home/community/mailing-lists.html
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------
Best regards,
Christian Ringele
Magnolia International Ltd.
Magnolia® - Simple Open Source Content Management
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------