Help:Variables

From ColorWiki

Jump to: navigation, search

MediaWiki knows some defined variables which can be used in texts. They are rendered differently depending on the time, the site and the page. Their syntax is similar to templates. If you want a page to show always the current time, you use {{CURRENTTIME}}. To distinguish variables from templates, most variables are capitalized.

Template:Hl3|Description Template:Hl3|You type Template:Hl3|You get
Template:Hl2 colspan="3" | Date & Wiki variables
Current month {{CURRENTMONTH}} 12
Current month {{CURRENTMONTHNAME}} December
Genitive form
of current month name
{{CURRENTMONTHNAMEGEN}} December
Abbreviated month name {{CURRENTMONTHABBREV}} Dec
Day of the month {{CURRENTDAY}} 19
Day of the week {{CURRENTDOW}} 3
Day of the week {{CURRENTDAYNAME}} Wednesday
Week {{CURRENTWEEK}} 51
Year {{CURRENTYEAR}} 2018
{{CURRENTTIME}} 11:21
{{NUMBEROFARTICLES}} 434
{{NUMBEROFFILES}} 790
Template:Hl2 colspan="3" | Namespaces
{{ns:-2}} or {{ns:Media}} Media
{{ns:-1}} or {{ns:Special}} Special
{{ns:2}} or {{ns:User}} User
{{ns:4}} or {{ns:Project}} ColorWiki
{{ns:6}} or {{ns:Image}} File
{{ns:8}} or {{ns:MediaWiki}} MediaWiki
{{ns:10}} or {{ns:Template}} Template
{{ns:12}} or {{ns:Help}} Help
{{ns:14}} or {{ns:Category}} Category
Template:Hl2 colspan="3" | Server specific
Sitename {{SITENAME}} ColorWiki
Servername {{SERVERNAME}} colorwiki.com
Server {{SERVER}} http://colorwiki.com
Script path {{SCRIPTPATH}}
Local part of the URL
{{localurl:pagename}} /wiki/Pagename
{{localurl:pagename|query string}} /index.php?title=Pagename&query string
Template:Hl2 colspan="3" | Page related
Pagename {{PAGENAME}} Variables
Pagename
(URL encoded)
{{PAGENAMEE}} Variables
Namespace {{NAMESPACE}} Help
Revision ID {{REVISIONID}} 2495

External links

See MediaWiki for more into: [MediaWiki help area]

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox