Template:Exists/doc: Difference between revisions
Created page with "{{Documentation subpage}} This template tests whether a given page exists. It can be useful in view of the maximum number of ParserFunctions#.23ifexi..." |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
This template tests whether a given page exists. It can be useful in view of the maximum number of #ifexist calls that can be used on a page. (However, in the case of frivolous use of #ifexist which was the reason for the limit, do not replace this use with frivolous use of this template!) | |||
This template tests whether a given page | |||
The full syntax for using it is: | The full syntax for using it is: | ||
<nowiki>{{</nowiki>exists | | <nowiki>{{</nowiki>exists | ''page/filename'' | ''result if page exists'' | ''result if page does not exist'' }} | ||
The method is based on transclusion of the possibly existing page. If the page does not exist the code for page transclusion produces a (red) link. Even if this result is used for comparison only, and not for final output, the page counts as being transcluded. Therefore the page appears as red link in the list of transcluded pages. | The method is based on transclusion of the possibly existing page. If the page does not exist the code for page transclusion produces a (red) link. Even if this result is used for comparison only, and not for final output, the page counts as being transcluded. Therefore the page appears as red link in the list of transcluded pages. | ||
Line 28: | Line 23: | ||
<includeonly> | <includeonly> | ||
[[Category:Templates|{{PAGENAME}}]] | [[Category:Templates|{{PAGENAME}}]] | ||
</includeonly> | </includeonly><noinclude>[[Category:Template documentation]]</noinclude> |