Help:Parser functions

From Disney•Pixar CARS Wiki
Jump to navigation Jump to search

Parser functions, or magic words, are essentially callbacks to special, software-level operations which aren't otherwise possible through regular user-defined means. Their syntax is nonetheless quite similar to templates, and may take one of a couple common forms:

  • Variables, not to be confused with the extension of the same name, which itself operates via parser functions. These generally have {{ALLCAPSNAMES}} and return environmental info, like system time or language, statistics, and page titles.
  • Functions, which look more like this {{#this:}} and accept parameters much like templates. Many extensions build on the core MediaWiki libraries with their own function hooks.

For our purposes, all hooks listed on Special:Version are documented here. Behavior switches (i.e. __THESETAGS__) seem to be omitted and may be documented elsewhere; see here for the list of <extensiontags>.

Parser function hooks

Name Origin Category
{{#anchorencode:}} URL data
{{#arraymap:}} PageForms
{{#arraymaptemplate:}} PageForms
{{#autoedit:}} PageForms
{{#autoedit_rating:}} PageForms
{{#avatar:}} SocialProfile
{{#basepagename:}} Page names
{{#basepagenamee:}} URL encoded page names
{{#bidi:}} Formatting
{{#canonicalurl:}} URL data
{{#canonicalurle:}} URL data
{{#cargo_attach:}} Cargo
{{#cargo_compound_query:}} Cargo
{{#cargo_declare:}} Cargo
{{#cargo_display_map:}} Cargo
{{#cargo_store:}} Cargo
{{#cargo_query:}} Cargo
{{#cascadingsources:}} Technical metadata of another page
{{#count:}} ParserFunctions
{{#default_form:}} PageForms
{{#defaultsort:}} [[mw:Help:Magic words#|]]
{{#displaytitle:}} [[mw:Help:Magic words#|]]
{{#dowhile:}} Loops
{{#dpl:}} DynamicPageList3
{{#dplchapter:}} DynamicPageList3
{{#dplmatrix:}} DynamicPageList3
{{#dplnum:}} DynamicPageList3
{{#dplreplace:}} DynamicPageList3
{{#dplvar:}} DynamicPageList3
{{#ev:}} EmbedVideo
{{#evl:}} EmbedVideo
{{#evt:}} EmbedVideo
{{#evu:}} EmbedVideo
{{#explode:}} ParserFunctions
{{#expr:}} ParserFunctions
{{#filepath:}} URL data
{{#forargs:}} Loops
{{#formatdate:}} Formatting
{{#formatnum:}} Formatting
{{#forminput:}} PageForms
{{#fornumargs:}} Loops
{{#fullpagename:}} Page names
{{#fullpagenamee:}} URL encoded page names
{{#fullurl:}} URL data
{{#fullurle:}} URL data
{{#gender:}} Localization functions
{{#grammar:}} Localization functions
{{#hidetitleicon:}} TitleIcon
{{#if:}} ParserFunctions
{{#ifeq:}} ParserFunctions
{{#iferror:}} ParserFunctions
{{#ifexist:}} ParserFunctions
{{#ifexpr:}} ParserFunctions
{{#int:}} Localization functions
{{#invoke:}} Scribunto
{{#language:}} Localization functions
{{#lc:}} Formatting
{{#lcfirst:}} Formatting
{{#len:}} ParserFunctions
{{#localurl:}} URL data
{{#localurle:}} URL data
{{#loop:}} Loops
{{#namespace:}} Namespaces
{{#namespacee:}} Namespaces
{{#namespacenumber:}} Namespaces
{{#numberingroup:}} Statistics
{{#numberofactiveusers:}} Statistics
{{#numberofadmins:}} Statistics
{{#numberofarticles:}} Statistics
{{#numberofedits:}} Statistics
{{#numberoffiles:}} Statistics
{{#numberofpages:}} Statistics
{{#numberofusers:}} Statistics
{{#ns:}} Namespaces_2
{{#nse:}} Namespaces_2
{{#padleft:}} Formatting
{{#padright:}} Formatting
{{#pageid:}} Technical metadata of another page
{{#pagename:}} Page names
{{#pagenamee:}} URL encoded page names
{{#pagesincategory:}} Statistics
{{#pagesize:}} Technical metadata of another page
{{#plural:}} Localization functions
{{#pos:}} ParserFunctions
{{#protectionexpiry:}} Technical metadata of another page
{{#protectionlevel:}} Technical metadata of another page
{{#recurring_event:}} Cargo
{{#rel2abs:}} ParserFunctions
{{#replace:}} ParserFunctions
{{#revisionday:}} Technical metadata of another page
{{#revisionday2:}} Technical metadata of another page
{{#revisionid:}} Technical metadata of another page
{{#revisionmonth:}} Technical metadata of another page
{{#revisionmonth1:}} Technical metadata of another page
{{#revisiontimestamp:}} Technical metadata of another page
{{#revisionuser:}} Technical metadata of another page
{{#revisionyear:}} Technical metadata of another page
{{#rmatch:}} RegexFunctions
{{#rootpagename:}} Page names
{{#rootpagenamee:}} URL encoded page names
{{#rpos:}} ParserFunctions
{{#rreplace:}} RegexFunctions
{{#rsplit:}} RegexFunctions
{{#seo:}} WikiSEO
{{#special:}} Miscellaneous
{{#speciale:}} Miscellaneous
{{#sub:}} ParserFunctions
{{#subjectpagename:}} Page names
{{#subjectpagenamee:}} URL encoded page names
{{#subjectspace:}} Namespaces
{{#subjectspacee:}} Namespaces
{{#subpagename:}} Page names
{{#subpagenamee:}} URL encoded page names
{{#switch:}} ParserFunctions
{{#tag:}} Miscellaneous
{{#talkpagename:}} Page names
{{#talkpagenamee:}} URL encoded page names
{{#talkspace:}} Namespaces
{{#talkspacee:}} Namespaces
{{#template_display:}} PageForms
{{#template_params:}} PageForms
{{#time:}} ParserFunctions
{{#timel:}} ParserFunctions
{{#titleicon_file:}} TitleIcon
{{#titleicon_ooui:}} TitleIcon
{{#titleicon_unicode:}} TitleIcon
{{#titleparts:}} ParserFunctions
{{#tooltip:}} SimpleTippy
{{#uc:}} Formatting
{{#ucfirst:}} Formatting
{{#urlencode:}} URL data
{{#var:}} Variables
{{#var_final:}} Variables
{{#vardefine:}} Variables
{{#vardefineecho:}} Variables
{{#varexists:}} Variables
{{#while:}} Loops