Template: Ifdef

From LibrePlanet
Jump to: navigation, search
(Add an ifdef implementation to be reused in other templates.)
 
(#ifeq doesn't seem to work)
Line 10: Line 10:
 
</nowiki>
 
</nowiki>
  
TODO: This template is still untested at this time.
+
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: