Help:Variables

From ColorWiki

Revision as of 23:01, 8 August 2006 by Patrick (Talk | contribs)
(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
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}} 03
Current month {{CURRENTMONTHNAME}} March
Genitive form
of current month name
{{CURRENTMONTHNAMEGEN}} March
Abbreviated month name {{CURRENTMONTHABBREV}} Mar
Day of the month {{CURRENTDAY}} 29
Day of the week {{CURRENTDOW}} 5
Day of the week {{CURRENTDAYNAME}} Friday
Week {{CURRENTWEEK}} 13
Year {{CURRENTYEAR}} 2024
{{CURRENTTIME}} 11:51
{{NUMBEROFARTICLES}} 463
{{NUMBEROFFILES}} 844
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