Template:Is valid page name
Template page
More actions
| Uses Lua: |
This template returns "valid" 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 "valid". As a convenience, the template treats "-" as an invalid page title.
Usage
{{#if:
{{{1|}}} |
{{#if:
{{Is valid page name|{{{1}}}}} |
[[{{{1}}}]] |
{{{1}}}
}}
}}
Examples
{{Is valid page name|Main Page}}returns "valid"{{Is valid page name|[[Main Page]]}}returns ""{{Is valid page name|This page could not POSSIBLY exist, could it?}}returns "valid"{{Is valid page name|-}}returns "" (even though "-" can exist){{Is valid page name}}returns ""
See also
- {{isValidPageName}} at the English Wiktionary