From Wikipedia, the free encyclopedia
This template detects whether a template exists of a given name. It is often useful to perform such a check before transcluding from a user-set parameter.
[edit] Examples
Input |
Returns |
{{tif|Foobarbaz}}
|
true |
Input |
Returns |
{{tif|Spoiler}}
|
true |
Input |
Returns |
{{tif|Foobarbaz|then=template exists|else=no such template}}
|
template exists |
Input |
Returns |
{{tif|Spoiler|then=template exists|else=no such template}}
|
template exists |
Capital letters for template names are not essential:
Input |
Returns |
{{tif|spoiler}}
|
true |
Input |
Returns |
{{tif|foobarbaz}}
|
true |
[edit] See also