Details
-
Bug
-
Resolution: Won't Fix
-
Trivial
-
None
-
2.0
-
None
-
XWiki Enterprise 2.0
-
velocity macros in syntax 2.0
-
Unknown
-
Description
When using a wiki page in syntax 2.0 as a container for velocity macros, the contents are trimmed of white spaces. This will not indent anymore the rendered html content. Also inside html macro you need a empty line so that the contents are not displayed on the same line.
Page MyModule.Macros
{{velocity output="false" "filter="none"}} #macro(display_document_comments $doc) <div> <p>COMMENTS</p> <p>ANOTHER ONE</p> </div> #end {{/velocity}}
Page MyModule.ClassSheet
{{velocity output="true" filter="none"}} {{html clean="false"}} <div><p>GUGU</p></div> <div><p>another one</p></div> {{/html}} $xwiki.includeForm("MyModule.Macros") #set($document = "Socracy.AnotherTest") {{html}} #display_document_comments($document) {{/html}} {{/velocity}}
Rendered output, html source:
<div><p>GUGU</p></div> <div><p>another one</p></div> <div> <p>COMMENTS</p> <p>ANOTHER ONE</p> </div>