On Sun, Dec 8, 2013 at 10:14 PM, Matthias Wegner <[email protected]> wrote:
Hi,
i want to display some pages in one page (to create a print or pdf). I use
{{groovy}} import org.xwiki.rendering.lyrics.Lyrics; for (Lyrics lyrics: services.component.getComponentManager().getInstanceList(Lyrics.class)) { // println("{{html}}\n\n{{/html}}\n") println("== "+lyrics.getTitle()+"==")
You could output a Velocity macro here where you set the parameters: println("{{velocity}}#set($parameter = 'value'){{/velocity}}")
println("{{include reference=\""+lyrics.getDocument()+"\"/}}") } {{/groovy}}
Hope this helps, Marius
with the Lyrics Macro (http://extensions.xwiki.org/xwiki/bin/view/Extension/Lyrics). But now i need to change some parameters in the macro from the included pages, so i can change the layout. I looked into the code of the include macro and try to set some parameters in the macro-block from the //documentBridge//. But this is after testing not working. Could you give me a hint?
Goal: I want to add a playlist-feature to the lyrics-macro, so i can set some songs which could be displayed in one page. For print i want to add the feature to enable/disable the fret-chord-pictures.
Regards, Matthias
-- View this message in context: http://xwiki.475771.n2.nabble.com/Inject-Parameter-in-a-macro-in-a-other-doc... Sent from the XWiki- Dev mailing list archive at Nabble.com. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs