Template:If-exist/doc
Appearance
![]() | This is a documentation subpage for Template:If-exist. It may contain usage information, categories and other content that is not part of the original template page. |
![]() | This template uses Lua: |
This template exists to be an optional template to be used by users instead of using
{{If|exist|page name|then|else}}
which might be a bit tricky. This template can be used with other template without causing any error(s).
Usage
[edit]{{If-exist|page name|[then this]|[else this]}} or {{If|exist|page name|[then this]|[else this]}} or {{#Ifexist:page name|[then this]|[else this]}}
Examples
[edit]Markup | Renders | {{If-exist|Example|exists|doesn't exists}}
|
exists | {{If-exist|Template:{{PAGENAME}}/doc|This page has a documentation subpage|This page doesn't have a documentation subpage}}
|
This page doesn't have a documentation subpage |
---|
See also
[edit]- {{If}}
- {{Ifnotempty}}
- {{Ifexist not redirect}}