Last modified by Simon Urli on 2023/10/10

From version 81.1
edited by Denis Gervalle
on 2013/02/19
Change comment: Add a sample of parsing macro content in velocity to avoid nested scripting error
To version 81.2
edited by Denis Gervalle
on 2013/02/19
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -148,9 +148,12 @@
148 148  
149 149  {code}
150 150  {{velocity output="no"}}
151 -#set($wikiresult = $xcontext.macro.content) ## get the macro content in a velocity string
152 -#set($wikiresult = "(% class='newstyle' %)((($wikiresult)))") ## Add a wrapping div as a sample of what the macro could do
153 -#set($xcontext.macro.result = $services.rendering.parse($wikiresult, $xwiki.getCurrentContentSyntaxId()).getChildren()) ## parse the string and return the resulting blocks
151 + ## get the macro content in a velocity string
152 +#set($wikiresult = $xcontext.macro.content)
153 +## Add a wrapping div as a sample of the action of this macro
154 +#set($wikiresult = "(% class='newstyle' %)((($wikiresult)))")
155 +## parse the string and return the resulting blocks
156 +#set($xcontext.macro.result = $services.rendering.parse($wikiresult, $xwiki.getCurrentContentSyntaxId()).getChildren())
154 154  {{/velocity}}
155 155  {code}
156 156  1.1 Troubleshooting

Get Connected