Version Macro
Last modified by Michael Hamann on 2024/05/15
Note: This macro works only standalone (and not inline) voluntarily. This is to allow displaying the versions in the gutter for example, which wouldn't be possible if used inline.
Example 1: Inline with "since"
{{version since='11.10.5, 12.5, 12.7RC1'}}
New feature...
{{/version}}
New feature...
{{/version}}
Results in:
XWiki 11.10.5+, 12.5+, 12.7+ New feature...
Example 2: Standalone with "before"
{{version before='11.10.5, 12.5'}}
Paragraph1
Paragraph2
{{/version}}
Paragraph1
Paragraph2
{{/version}}
Results in:
XWiki <11.10.5, <12.5
Paragraph1
Paragraph2
Example 3: Inline in list items
* {{version since='11.10.5'}}List item1{{/version}}
* {{version since='12.5'}}List item2{{/version}}
* {{version since='12.7RC1'}}List item3{{/version}}
* {{version since='12.5'}}List item2{{/version}}
* {{version since='12.7RC1'}}List item3{{/version}}
Results in:
- XWiki 11.10.5+ List item1
- XWiki 12.5+ List item2
- XWiki 12.7+ List item3
Example 4: Different product
{{version product='Latex' since='11.10.5, 12.5, 12.7RC1'}}
New feature...
{{/version}}
New feature...
{{/version}}
Results in:
Latex 11.10.5+, 12.5+, 12.7+ New feature...