Revision as of 2009-07-07 20:35:02
  Older version (diff) | current version (diff) | Newer version (diff)

Wiki:Magic Words  

< Documentation

Magic Words look like template calls (surround by double curly braces) but they have no parameters and return a system variable value. Traditionally they are always types in all-caps to make them easy to see in the template code, but they are actually case-insensitive.

URL Magic
Magic WordMeaningExample
{{PAGENAME}}Returns the title of the current wiki page, without any leading namespace:Magic Words
{{PAGENAMEE}}Returns the url-encoded title of the current wiki page, without any leading namespace:Magic_Words
{{NAMESPACE}}Returns the url-encoded namespace portion of the current wiki page title (without the colon)Wiki
{{ARTICLES|category}} (proposed)Returns the number of articles in a given category, or the total number of articles in the wikibase, not including category pages.ARTICLES
{{PAGES|category}} (proposed)Returns the total number of pages in a given category, or the total number of pages in the wikibase, including category pages.PAGES

This page last modified 2009-07-07 20:35:02.