On 27.08.2010 15:11, Christian Ringele wrote:
Hi Nils,
Hi Christian, sorry to reply so late, but I needed to postpone my
activities on this behaviour..
You can call on template¶graph renderers (for example the class
FreemarkerParagraphRenderer) the method render(Content content,
Paragraph paragraph, Writer out).
Additionally there are the methods int the MagnoliaTemplatingUtilities
class where you just can pass the content you want to render, such as:
public void renderTemplate(Content content) throws RenderException,
IOException {
renderTemplate(content, getWriter());
}
public void renderParagraph(Content paragraphNode) throws
RenderException, IOException {
renderParagraph(paragraphNode, getWriter());
}
I think this method is what actually we need.
But I think that a loop can be created if we are not sure that circular
references are made within mirror paragraphs.
e.g.:
I have 3 paragraphs:
mirrorA
mirrorB
mirrorC
mirrorA --> mirrorB --> mirrorC
and then mirrorC --> mirrorA
at this point, I have a loop, isn't it?
Another point:
sometimes can be useful to override custom template (.ftl) used to
render content. So, I created a dialog that will let me to point a
paragraph (a sort of JCR Browser extension) and a free field, where
advanced user can insert the path to a new freemarker template (or maybe
another JCR Browser to "template" workspace).
At this point, I need to pass to the ParagraphRenderer /
TemplateRenderer the ovverridden template path.
To summarize, I had to rewrite some code (I wrote a ModelClass) in order
to manage those 2 scenarios, but in the end I reached my goal!
Thanks to all for suggestions and pointers!!
Cheers
Christian
Matteo
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------