Changes

variables (this is a big topic. Should this be split off?)
Line 230: Line 230:     
See [[help:creating templates|here]] for creating templates.
 
See [[help:creating templates|here]] for creating templates.
 +
 +
== Variables ==
 +
MediaWiki includes a number of variables, which are auto-populated by the software each time the page is loaded. Here are some variables which can be useful, especially in the design of a template.  Variables are entered with double braces on each side.  They are show this way bellow, allthough by the strictest definition, the braces are not part of the variable tag.<br />
 +
In every-day writing, these variables are not likely to be used.
 +
===Site variables===
 +
Probably some of the least useful variables are site variables.  Unless someone is designing a template for multiple wikis, these probably will not be used.
 +
{| class="wikitable"
 +
|-
 +
!Variable!!Description!!Current Value
 +
|-
 +
|<nowiki>{{SITENAME}}</nowiki>||Website name ||{{SITENAME}}
 +
|-
 +
|<nowiki>{{SERVERNAME}}</nowiki>||Wiki's server name||{{SERVERNAME}}
 +
|-
 +
|<nowiki>{{SERVER}}</nowiki>||Wiki's server address||{{SERVER}}
 +
|-
 +
|<nowiki>{{CURRENTVERSION}}</nowiki> || Curent version of Wiki software||{{CURRENTVERSION}}
 +
|-
 +
|}
 +
===Page variables===
 +
{| class="wikitable"
 +
|-
 +
! Variable !! Description !! Current Value
 +
|-
 +
| <nowiki>{{PAGENAME}}</nowiki> || Displays the current page name ||{{PAGENAME}}
 +
|-
 +
|<nowiki>{{PAGENAMEE}}</nowiki> || Displays the current page name with underscores in place of spaces ||{{PAGENAMEE}}
 +
|-
 +
|<nowiki>{{ARTICLEPAGENAME}}</nowiki> || Article page Name ||{{ARTICLEPAGENAME}}
 +
|-
 +
|<nowiki>{{SUBJECTPAGENAME}}</nowiki> || Subject page name ||{{SUBJECTPAGENAME}}
 +
|-
 +
|<nowiki>{{BASEPAGENAME}}</nowiki> ||Page name without namespace||{{BASEPAGENAME}}
 +
|-
 +
|<nowiki>{{ROOTPAGENAME}}</nowiki> ||Page name without namespace||{{ROOTPAGENAME}}
 +
|-
 +
|<nowiki>{{SUBPAGENAME}}</nowiki> ||Sub-page name, if applicable. Otherwise, page name||{{SUBPAGENAME}}
 +
|-
 +
|<nowiki>{{FULLPAGENAME}}</nowiki> ||Page name with namespace||{{FULLPAGENAME}}
 +
|-
 +
|<nowiki>{{FULLPAGENAMEE}}</nowiki> || Full page name with underscores in place of spaces||{{FULLPAGENAMEE}}
 +
|-
 +
| <nowiki>{{NAMESPACE}}</nowiki> || Current namespace ||{{NAMESPACE}}
 +
|-
 +
|<nowiki>{{TALKPAGENAME}}</nowiki> || Talk page name ||{{TALKPAGENAME}}
 +
|-
 +
|<nowiki>{{TALKSPACE}}</nowiki> || Namespace of talk page ||{{TALKSPACE}}
 +
|-
 +
| <nowiki>{{ARTICLESPACE}}</nowiki> || Namespace of main article||{{ARTICLESPACE}}
 +
|-
 +
|<nowiki>{{NAMESPACE}}</nowiki> || Name space of current page ||{{NAMESPACE}}
 +
|-
 +
|<nowiki>{{NAMESPACENUMBER}}</nowiki> || Namespace number ||{{NAMESPACENUMBER}}
 +
|-
 +
|<nowiki>{{SUBJECTSPACE}}</nowiki> || Subject Space ||{{SUBJECTSPACE}}
 +
|-
 +
|}
 +
    
[[Category:Help|Formatting]]
 
[[Category:Help|Formatting]]
Block, SkipCaptcha, Upload, Automoderated users, Check users, delete, edit, Moderators, move, oversight, protect, ratelimit-exempt, rollback, Administrators
20,389

edits