Changes

Jump to navigation Jump to search
m
1 revision
{{Documentation subpage}}
{{High-use|5,000+}}
<!-- Categories and interwikis go at the bottom of this page. -->

This template returns "<code>valid</code>" if the given page title is valid, or the empty string otherwise. The page does not need to exist in order for the template to return "<code>valid</code>". As a convenience, the template treats "<code>-</code>" as an invalid page title.

== Usage ==
<nowiki>{{#if:
{{{1|}}} |
{{#if:
{{isValidPageName|{{{1}}}}} |
[[{{{1}}}]] |
{{{1}}}
}}
}}</nowiki>

== Examples ==
*<code><nowiki>{{isValidPageName|Main Page}}</nowiki></code> returns "<code>{{isValidPageName|Main Page}}</code>"
*<code><nowiki>{{isValidPageName|[[Main Page]]}}</nowiki></code> returns "<code>{{isValidPageName|[[Main Page]]}}</code>"
*<code><nowiki>{{isValidPageName|This page could not POSSIBLY exist, could it?}}</nowiki></code> returns "<code>{{isValidPageName|This page could not POSSIBLY exist, could it?}}</code>"
*<code><nowiki>{{isValidPageName|-}}</nowiki></code> returns "<code>{{isValidPageName|-}}</code>" (even though "[[-]]" can exist)
*<code><nowiki>{{isValidPageName}}</nowiki></code> returns "<code>{{isValidPageName}}</code>"

== See also ==
*{{[[wikt:Template:isValidPageName|isValidPageName]]}} at the English Wiktionary

<includeonly>
<!-- Categories and interwikis go here: -->
[[Category:Wikipedia utility templates]]

[[ko:틀:IsValidPageName]]
[[th:แม่แบบ:IsValidPageName]]
</includeonly>
Bureaucrats, developer, smwadministrator, Administrators
10,246

edits

Navigation menu