Jump to content

Template:If-exist/doc

From Wikipedia, the free encyclopedia

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]