Modèle:If

De Inkipédia
Aller à la navigation Aller à la recherche

{{ 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 }}