
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" variables
These variables are mainly useful in the event that Memory Alpha content is included in some other MediaWiki-based database.
{{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}} | Memory Alpha |
{{ns:5}} or {{ns:Project_talk}} | Memory Alpha 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:102}} or {{ns:Portal}} | Portal |
{{ns:103}} or {{ns:Portal_talk}} | Portal talk |
{{ns:110}} or {{ns:Forum}} | Forum |
{{ns:111}} or {{ns:Forum_talk}} | Forum talk |
{{ns:828}} or {{ns:Module}} | Module |
{{ns:829}} or {{ns:Module_talk}} | Module talk |
{{SITENAME}} | Memory Alpha |
{{SERVER}} | https://memory-alpha.fandom.com |
{{localurl:pagename}} | /wiki/Pagename |
{{localurl:pagename|query string}} | /wiki/Pagename?query string |
Time-based variables
{{CURRENTMONTH}} | 03 |
{{CURRENTMONTHNAME}} | March |
{{CURRENTMONTHNAMEGEN}} | March |
{{CURRENTDAY}} | 4 |
{{CURRENTDAYNAME}} | Thursday |
{{CURRENTYEAR}} | 2021 |
{{CURRENTCENTURY}} | 21 |
{{CURRENTTIME}} | 17:02 |
{{NUMBEROFARTICLES}} | 50,700 |
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 variables
{{NAMESPACE}} | MA Help |
{{PAGENAME}} | Variable |
{{PAGENAMEE}} | Variable |
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.
When used in a template, these three variables refer to the page in which the template is included, not to the template page.
Examples of combinations
- {{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAMEE}}|action=edit}}
- https://memory-alpha.fandom.com/wiki/MA_Help:Variable?action=edit
- {{SERVER}}{{localurl:Special:Whatlinkshere|target={{NAMESPACE}}:{{PAGENAMEE}}}}
- https://memory-alpha.fandom.com/wiki/Special:Whatlinkshere?target=MA Help:Variable
- [[{{NAMESPACE}}:{{PAGENAMEE}}/temp]]
- MA Help:Variable/temp
- {{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAMEE}}/temp}}
- https://memory-alpha.fandom.com/wiki/MA_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.
Search • Namespaces • Page names • Shortcuts (keyboard) • Links (backlinks • piped • interwiki • redirects) • Categories • Supported browsers
New pages • Editing • Sections • Templates • Special characters • ISBN links • Edit summary • Minor edits • Edit conflicts
Wiki markup (HTML) • Tables (sorting) • Sections • Images (galleries) • Formulas • Poems and lyrics
Recent changes (enhanced) • Related changes • Watching pages • Diff • Page history • Edit summary • User contributions • Minor edits
Starting a new page • Renaming a page • Merging two pages • Protecting a page • Deleting a page • Edit conflicts
Parser functions • Variables • Magic words • Input boxes • Image maps • Random selections • Dynamic page lists • Tabview • Category trees • Ogg files