- XWiki Labs
- XWiki Syntax Guide
- XWikiSyntaxParameters
XWikiSyntaxParameters
Advanced
Parameters
1.0 Parameters
In XWiki Syntax 1.0 there is no syntax for passing parameters and the only way to do it was to write XHTML directly in the content as shown in the table below.
XWiki Syntax 1.0 | Generated XHTML |
---|---|
<h1 class="myClass" style="myStyle" id="myId">heading</h1> | <h1 class="myClass" style="myStyle" id="myId">heading</h1> |
2.0 Parameters
With XWiki Syntax $crtSyntaxVer it's possible to pass parameters to the different syntax elements and also to blocks of text. This is used for example to style them. You can set any parameter key/value pair you want. The XHTML renderer will pass these parameters as XHTML attributes to the underlying XHTML representation of the different syntax elements.
XWiki Syntax $crtSyntaxVer | Generated XHTML |
---|---|
(% class="myClass" style="myStyle" id="myId" %) = heading = | <h1 class="myClass" style="myStyle" id="myId">heading</h1> |