Difference between revisions of "Template:IfSemantics"
Dinoguy1000 (talk | contribs) (fix to work with base SMW extension) |
Dinoguy1000 (talk | contribs) (update SMW check) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | {{{{{ | + | {{ safesubst:<noinclude/>#varexists: $smw || {{ safesubst:<noinclude/>#vardefine: $smw | {{ safesubst:<noinclude/>#if: {{ safesubst:<noinclude/>#set: }} || 1 }} }} }}{{ safesubst:<noinclude/>#if: {{ safesubst:<noinclude/>#var: $smw }} | {{{1|1}}} | {{{2|}}} }}<noinclude>{{documentation}}</noinclude> |
Latest revision as of 23:52, 25 June 2023
1
Semantic MediaWiki is enabled. (refresh) |
{{IfSemantics}}
is a template used to control how content is displayed depending on whether the extension Semantic MediaWiki (SMW) is enabled or not.
Usage
The content of the first unnamed parameter is what displays if SMW is enabled. The content of the second unnamed parameter is what will be displayed if SMW is not enabled.
For example. {{IfSemantics|X|Y}}
will produce X if SMW is enabled and Y if it isn't enabled.
See also
- {{SMWF}}
- {{SMW banner}}
- {{SMW notice}}