Template:Ifexists/doc: Difference between revisions

From DynamicPageList3 Manual
Content added Content deleted
(Created page with "{{doc/start}} This template is similar to <nowiki>{{ #ifexist: }}</nowiki> as it checks the existence of the given page. The difference...")
 
imported>FrozenPlum
m (Fix fandom inconsistent doc format)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{doc/start}}
<!-- Documentation here -->
This template is similar to [[mw:Help:ParserFunctions#.23ifexist|<nowiki>{{ #ifexist: }}</nowiki>]] as it checks the existence of the given page. The difference is that the checked page is not added to [[Special:Wantedpages|Wanted pages]].
This template is similar to [[mw:Help:ParserFunctions##ifexist|<nowiki>{{ #ifexist: }}</nowiki>]] as it checks the existence of the given page. The difference is that the checked page is not added to [[Special:Wantedpages|wanted pages]].


== Usage ==
== Usage ==
Line 17: Line 18:


; ''redirects =''
; ''redirects =''
Optional. '''exclude''' ''or'' '''only''' (defaults to '''include''')
Optional. <code>exclude</code> or <code>only</code> (defaults to <code>include</code>)


; ''ns =''
; ''ns =''
Optional. Defaults to main namespace.
Optional. Defaults to main namespace.

{{doc/end}}
<includeonly>
<!-- Template categories/interwikis here -->
[[Category:Templates]]
</includeonly>

Latest revision as of 04:40, 29 March 2022

This is the documentation page, it should be transcluded into the main template page. See Template:Documentation for more information

This template is similar to {{ #ifexist: }} as it checks the existence of the given page. The difference is that the checked page is not added to wanted pages.

Usage

{{ ifexists|(pagename)|(then)|(else) }}
unnamed parameter 1

Pagename without braces, including namespace.

unnamed parameter 2

Optional. Wikitext if page exists.

unnamed parameter 3

Optional. Wikitext if page does not exists.

redirects =

Optional. exclude or only (defaults to include)

ns =

Optional. Defaults to main namespace.