Template: Ifdef
From LibrePlanet
(Add an ifdef implementation to be reused in other templates.) |
(#ifeq doesn't seem to work) |
||
Line 10: | Line 10: | ||
</nowiki> | </nowiki> | ||
− | TODO: | + | TODO: |
+ | * Enable the [https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions##ifexp extension ParserFunctions extension] or rewrite it in another way. | ||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> |
Revision as of 10:16, 8 February 2021
{{#ifeq x{{{1}}} | x | | {{{2}}} }}
<noinclue> This is a template.
Here is an example of using the template:
{{Ifdef | {{somename}} | Text if {{somename}} is defined}}
TODO:
- Enable the extension ParserFunctions extension or rewrite it in another way.