แม่แบบ:pagename
- The following documentation is located at แม่แบบ:pagename/documentation. [edit]
- Useful links: subpage list • links • redirects • transclusions • errors (parser/module) • sandbox
แม่แบบ:uses lua
This is the proper substitute to be used in place of {{PAGENAME}} and {{SUBPAGENAME}}. It produces the logical pagename, which is the underlying pagename free of transformations to handle unsupported characters and mammoth pages (pages such as a that are too big are hence are split into subpages). The parser function {{PAGENAME}} produces the physical pagename, which includes those transformations and also has HTML-encoding of certain punctuation characters, which makes it unsuitable for passing directly to {{urlencode:}}.
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, it will return a on all of the following pages:
- a
- a/languages A to L (since a is designated as a mammoth page)
- Appendix:Lojban/a
- Reconstruction:Proto-Slavic/a
- User:Example/a