Template:pagename
- The following documentation is located at Template:pagename/documentation. [edit]
- Useful links: subpage list • links • redirects • transclusions • errors (parser/module) • sandbox
This template is to be used in place of {{PAGENAME}} and {{SUBPAGENAME}}. It produces the logical pagename of the current entry, that is, the underlying pagename free of the special transformations applied to unsupported titles and mammoth pages (pages such as a that are split into subpages due to their size).
The built-in MediaWiki parser functions produce the physical pagename, which includes those transformations and also has HTML-encoding of certain punctuation characters, making it unsuitable for passing directly to {{urlencode:}}.
Usage
In namespaces other than the mainspace, {{pagename}} produces the subpage, i.e. the pagename after the final slash if there is such a slash, and without the namespace prefix.
For example, {{pagename}} will return a on all of the following pages:
For unsupported titles, it will convert the unsupported symbols to Unicode characters whenver possible. For example, Unsupported titles/¯\`lowbar`(ツ)`lowbar`/¯ returns ¯\_(ツ)_/¯. Likewise, on Unsupported titles/Space, it returns (a space). However, on Unsupported titles/church ruins symbol, it returns church ruins symbol, as no Unicode character is available.
See also
{{strip diacritics}}- constructs the logical pagename for a specified term