Template:If

From Inkipedia, the Splatoon wiki
Revision as of 21:49, 9 March 2016 by Slate (talk | contribs) (doc)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

{{ safesubst:p{{ safesubst:#if{{{1}}}:{{{2}}}|1|2}}|{{{3}}}|}}

Summary

The if template safely substitutes templates after pre-processor parsing. It is a nice wrapper for the #if: magic template.

Remember the double pipe for a standard if!

See documentation on Wikipedia.

Examples

{{if||condition|Do this if true|Do this if false}}
{{if||{{{2|}}}|{{{2}}} has input|Something else}}
{{if|exist| Main Page | Main Page exists | Main Page does not exist }}