Wikia

Wookieepedia

Help:Variable

Talk0
103,605pages on
this wiki
Revision as of 16:59, April 26, 2007 by Xwing328 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Help: Contents

This page presents a list of variables that can be used in the wikitext. Similar to templates, their content is dynamically included in the page text. Unlike templates, however, a variable's rendering depends on the time, the project, or the page on which it appears.

Contents

"Constant" variablesEdit

These variables are mainly useful in the event that Wookieepedia content is included in some other MediaWiki-based database. Namespace 0 (zero) is the article namespace (Main).

{{ns:-2}} or {{ns:Media}} Media
{{ns:-1}} or {{ns:Special}} Special
{{ns:1}} or {{ns:Talk}} Talk
{{ns:2}} or {{ns:User}} User
{{ns:3}} or {{ns:User_talk}} User talk
{{ns:4}} or {{ns:Project}} Wookieepedia
{{ns:5}} or {{ns:Project_talk}} Wookieepedia talk
{{ns:6}} or {{ns:Image}} File
{{ns:7}} or {{ns:Image_talk}} File talk
{{ns:8}} or {{ns:MediaWiki}} MediaWiki
{{ns:9}} or {{ns:MediaWiki_talk}} MediaWiki talk
{{ns:10}} or {{ns:Template}} Template
{{ns:11}} or {{ns:Template_talk}} Template talk
{{ns:12}} or {{ns:Help}} Help
{{ns:13}} or {{ns:Help_talk}} Help talk
{{ns:14}} or {{ns:Category}} Category
{{ns:15}} or {{ns:Category_talk}} Category talk
{{ns:100}} or {{ns:Forum}} Forum
{{ns:101}} or {{ns:Forum_talk}} Forum talk
{{SITENAME}} Wookieepedia
{{SERVER}} http://starwars.wikia.com
{{localurl:pagename}} /wiki/Pagename
{{localurl:pagename|query string}} /wiki/Pagename?query string

Time-based variablesEdit

The time in UTC. Note that if the page was displayed by the same user and has not changed (has not been edited) since the last time it was displayed, it is possible that the page may be cached (by the user's browser) and the displayed time or date may not change. Also, if a heavily used page, rather than freshly rendered by the software each time it is generated, is instead being retrieved from a caching system, the date or time may not change from the last time the page was originally retrieved by the caching hardware or software.

Word Example
{{CURRENTDAY}} 24
{{CURRENTDAY2}} 24
{{CURRENTDAYNAME}} Friday
{{CURRENTDOW}} 5
{{CURRENTMONTH}} 05
{{CURRENTMONTHABBREV}} May
{{CURRENTMONTHNAME}} May
{{CURRENTMONTHNAMEGEN}} May
{{CURRENTTIME}} 07:41
{{CURRENTHOUR}} 07
{{CURRENTWEEK}} 21
{{CURRENTYEAR}} 2013
{{CURRENTTIMESTAMP}} 20130524074103

StatisticsEdit

{{CONTENTLANGUAGE}} en
{{CURRENTVERSION}} 1.19.6
{{NUMBEROFARTICLES}}
{{NUMBEROFARTICLES:R}}
103,605
103605
{{NUMBEROFPAGES}}
{{NUMBEROFPAGES:R}}
333,190
333190
{{NUMBEROFFILES}}
{{NUMBEROFFILES:R}}
56,052
56052
{{NUMBEROFUSERS}}
{{NUMBEROFUSERS:R}}
8,742,943
8742943
{{NUMBEROFADMINS}}
{{NUMBEROFADMINS:R}}
23
23

The NUMBEROFARTICLES variable is defined as the number of articles in the main namespace that contain a link to another page and are not a redirect. In other words, the number of articles, stubs containing a link, and disambiguation pages.

Page-based variablesEdit

Word Example
{{PAGENAME}} Variable
{{PAGENAMEE}} Variable
{{SUBPAGENAME}}
{{SUBPAGENAMEE}}
Variable
Variable
{{BASEPAGENAME}}
{{BASEPAGENAMEE}}
Variable
Variable
{{NAMESPACE}}
{{NAMESPACEE}}
Help
Help
{{FULLPAGENAME}}
{{FULLPAGENAMEE}}
Help:Variable
Help:Variable
{{TALKSPACE}}
{{TALKSPACEE}}
Help talk
Help_talk
{{SUBJECTSPACE}}
{{SUBJECTSPACEE}}
Help
Help
{{ARTICLESPACE}}
{{ARTICLESPACEE}}
Help
Help
{{TALKPAGENAME}}
{{TALKPAGENAMEE}}
Help talk:Variable
Help_talk:Variable
{{SUBJECTPAGENAME}}
{{SUBJECTPAGENAMEE}}
Help:Variable
Help:Variable
{{ARTICLEPAGENAME}}
{{ARTICLEPAGENAMEE}}
Help:Variable
Help:Variable
{{REVISIONID}} 1302803
{{REVISIONDAY}} 26
{{REVISIONDAY2}} 26
{{REVISIONMONTH}} 04
{{REVISIONYEAR}} 2007
{{REVISIONTIMESTAMP}} 20070426165950
{{SITENAME}} Wookieepedia
{{SERVER}} http://starwars.wikia.com
{{SERVERNAME}} starwars.wikia.com

PAGENAMEE will display the page title in the style that is used in URLs – that is, with underscores for spaces and escape codes for special characters. For example, a page called "Test page" would render as "Test_page" instead. FULLPAGENAME basically combines NAMESPACE and PAGENAME.

When used in a template, these four variables refer to the page in which the template is included, not to the template page.

Examples of combinationsEdit

{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAMEE}}|action=edit}} 
http://starwars.wikia.com/wiki/Help:Variable?action=edit
{{SERVER}}{{localurl:Special:Whatlinkshere|target={{NAMESPACE}}:{{PAGENAMEE}}}} 
http://starwars.wikia.com/wiki/Special:Whatlinkshere?target=Help:Variable
[[{{NAMESPACE}}:{{PAGENAMEE}}/temp]] 
Help:Variable/temp
{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAMEE}}/temp}} 
http://starwars.wikia.com/wiki/Help:Variable/temp

In a template, for a link to a page which depends on a template parameter, the external link style is used even for internal links, to avoid that the system links to the edit page even if the page exists. To construct the external link, variables can also be useful.

External linksEdit

Wikimedia Meta-WikiEdit

Photos

Add an Image
54,642images on this wiki
See all photos >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki