GTA Wiki

Help:Magic Words

Redirected from MW

11,409pages on
this wiki
Add New Page

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Magic Words are phrases recognised by MediaWiki which perform special functions, such as showing a Table of Contents, or the name of the current page.

Read more at:


These Magic Words force something to show, or be hidden

Magic Word Description
__TOC__ Forces the Table of Contents to show here, even if not required
__NOTOC__ Stops the Table of Contents from showing
__FORCETOC__ Forces the Table of Contents to show (in its normal position), even if not required
{{toc}} Floats the Table of Contents to the right
{{tocleft}} Floats the Table of Contents to the left
__NOEDITSECTION__ Stops the [edit] links from showing on this page
__NEWSECTIONLINK__ Makes a + button appear next to the edit tab, eg for adding a new section to a talk page
__NOGALLERY__ In a category page, make images show up in a list rather than in a thumbnail gallery
__HIDDENCAT__ In a category page, stops that category from showing up in the horizontal box on the bottom of pages within that category


These Magic Words echo out the contents of a variable, such as the date, or article name.


Magic Word Example Description
{{CURRENTDAY}} 9 The day of the month (eg 1)
{{CURRENTDAY2}} 09 The day of the month, with a leading zero (eg 01)
{{CURRENTDAYNAME}} Friday The full name of the current day
{{CURRENTDOW}} 5 The numeric representation of the day of the week
{{CURRENTMONTH}} 12 The number of the current month, with a leading zero (eg 01)
{{CURRENTMONTHNAME}} December The full name of the current month
{{CURRENTMONTHABBREV}} Dec The abbreviated name of the current month
{{CURRENTTIME}} 17:30 The current time in 24h format
{{CURRENTHOUR}} 17 The current hour in 24h format, with a leading zero
{{CURRENTWEEK}} 49 The current week of the year, with no leading zero
{{CURRENTTIMESTAMP}} 20161209173010 The current ISO 8601 time stamp.
{{LOCALTIME}} 17:30 For most of the above date/time varibles, replacing CURRENT with LOCAL will show the current date/time of the Wiki's default settings, rather than that in the User's preferences.

Wiki Statistics

These variables echo out statistics from this wiki. Numeric values are shown with thousand separators (eg 1,000,000). Adding :R onto the end of some of these (eg {{NUMBEROFEDITS:R}}) will show the number in its raw format, without thousand separators (eg 1000000) which can be used in calculations.

Magic Word Example Description
{{CURRENTVERSION}} 1.19.24 Current version of MediaWiki used on this wiki
{{NUMBEROFEDITS}} 959,094 The total number of edits on this wiki
{{NUMBEROFPAGES}} 149,523 The total number of pages on this wiki, including everything
{{NUMBEROFARTICLES}} 11,409 The total number of articles on this wiki, including only legitimate articles
{{NUMBEROFFILES}} 59,563 The total number of files (images) uploaded to this wiki
{{NUMBEROFUSERS}} 10,693,944 The total number of Users in the entireity of Wikia
{{NUMBEROFADMINS}} 8 The total number of users on this wiki in the Administrator group

For the number of pages within a category, see other information (below)

Page Names

Adding an E onto the end of most of these page names will show the same function, but using underscores instead of spaces so it can be used in a web link (URL).

Magic Word Example Description
{{FULLPAGENAME}} Help:Magic Words The full name of the current page. AKA combines {{NAMESPACE}} and {{PAGENAME}}
{{PAGENAME}} Magic Words The name of the page, not including the namespace
{{PAGENAMEE}} Magic_Words The above, but using underscores to be URL-friendly
{{BASEPAGENAME}} Magic Words For subpages, shows the page above it. AKA removes everything after the last slash (/).
{{NAMESPACE}} Help The name of the current namespace
{{TALKSPACE}} Help talk The name of the next odd-numbered namespace. Usually the appropriate talk namespace.
Help The name of the previous even-numbered namespace. For talk pages, this will show the namespace of the main article.
{{TALKPAGENAME}} Help talk:Magic Words The full link to the relevant talk page. AKA combines {{TALKSPACE}} and {{PAGENAME}}
Help:Magic Words The full link to the relevant main article. AKA combines {{SUBJECTSPACE}} and {{PAGENAME}}

Other Page Information

Magic Word Example Description
{{REVISIONID}} 827001 The Unique ID of the current page.
{{REVISIONDAY}} 4 The day on which the page was last modified. {{REVISIONDAY2}} shows a leading zero for single-digit days.
{{REVISIONMONTH}} 09 The month on which the page was last modified. {{REVISIONMONTH1}} removes the leading zero for single-digit months.
{{REVISIONYEAR}} 2015 The year on which the page was last modified.
{{REVISIONTIMESTAMP}} 20150904155559 The timestamp of when the page was last modified.
{{REVISIONUSER}} TAlim 1994 The username of the last editor of the page.
{{PAGESINCATEGORY:Cleanup}} 127 The number of pages within a given category. {{PAGESINCAT:category}} also works.
{{PAGESIZE:page}} 1,682 The byte size of a given page.

Namespaces and URLs

Magic Word Example Description
{{SITENAME}} GTA Wiki The full site name
{{SERVER}} The URL of the wiki
{{SERVERNAME}} The domain name of the wiki
{{SCRIPTPATH}} The path (after the server name) to the wiki pages
{{ns:1}} Talk The name of a namespace number
{{#special:}} No such special page Links to a special page
{{localurl:Main Page}} /wiki/Main_Page The local URL of a page name
{{localurl:Main Page|action=purge}} /wiki/Main_Page?action=purge The local URL of a page name, with parameters
{{localurl:Wikipedia:Category}} The local URL to an external page will show up as a full URL
{{SERVER}}{{localurl:Main Page}} The full URL to a page is created by using the server URL then adding the full page name in localurl, which turns spaces to underscores
{{SERVER}}{{localurl:{{TALKPAGENAME}}}} The full URL to a talk page can be ouput in the same way as a page name
{{SERVER}}{{localurl:{{TALKPAGENAME}}|action=edit}} The full URL to Edit a talk page can be given using localurl and the edit parameter


Magic Word Example Description
{{lc:AbC dEf}} abc def Turns a string to lower case
{{uc:AbC dEf}} ABC DEF Turns a string to upper case
{{lcfirst:TESTing}} testing Makes the first character of a string into lower case
{{ucfirst:testing}} Testing Makes the first character of a string into upper case
{{formatnum:-218744561.35123}} -218,744,561.35123 Formats a number string, adds thousand separator as appropriate. Recognises positive/negative.
{{padleft:7|3}} 007 Pads a number/string (first variable) to the specified length of digits (second variable) to the left using a zero
{{padleft:7|3|X}} XX7 Pads a number/string to the specified length of digits to the left using a specified character (third variable)
{{padright:C|3|S}} CSS Pads a number/string (as above) to the right
{{#language:de}} Deutsch Shows the native name of a language ID code

Image Modifiers

Magic Word Usage Example Description


Places an image in a frame with a description. Uses original size and stubbornly ignores width parameter if given.

In general, far better to use thumb, as is only suitable for small images.



Modifies image size, sets it dependent on user's favorite thumbnail size in one's preferences, or on the given width parameter (see below).
thumb=image.jpg [[Image:Blank.jpg|thumb=clock.svg|Caption]]
Shows a thumbnail image of choice
border [[Image:Clock.svg|border]] File:Clock.svg Shows a 1px border around the image
40px [[Image:Blank.jpg|40px]] Blank Resizes an image to specified dimensions. If one dimension is specified, it sets the width and maintains the aspect ratio.
50x100px [[Image:Blank.jpg|50x100px]] Blank If two dimensions are specified (width x height), it uses them as maximums . EG it scales image to no more than 50 pixels wide and no more than 100 high, but image scaled to retain its true aspect ratio within the boundary specified.
40px|Caption [[Image:Blank.jpg|thumb|80px|Caption]]


Shows a thumbnail of the image, resizes the thumbnail, adds a caption

Image Position

Magic Word Usage Example Description
right Text1 Text1 Text1

[[Image:Blank.jpg|right]] Text2 Text2 Text2
Text3 Text3 Text3

Text1 Text1 Text1

Text2 Text2 Text2
Text3 Text3 Text3

Floats an image (or thumbnail) right. Text will wrap to the left of it.
left Text1 Text1 Text1

[[Image:Blank.jpg|left]] Text2 Text2 Text2
Text3 Text3 Text3

Text1 Text1 Text1

Text2 Text2 Text2
Text3 Text3 Text3

Floats an image (or thumbnail) left. Text will wrap to the right of it.
none Text1 Text1 Text1

[[Image:Blank.jpg|none]] Text2 Text2 Text2
Text3 Text3 Text3

Text1 Text1 Text1

Text2 Text2 Text2
Text3 Text3 Text3

Explicitly states that the image will not float
Text1 Text1 Text1

[[Image:Blank.jpg|center]] Text2 Text2 Text2
Text3 Text3 Text3

Text1 Text1 Text1

Text2 Text2 Text2
Text3 Text3 Text3

Centers an image, still acts like none. Works with either British or American spelling.

Template Modifiers

Magic Word Example Description
{{:GTA}} (no example included due to size of GTA page) A leading colon is the prefix for the name namespace (IE an empty namespace). This will transclude the specified page, not the page within the template: namespace. This example will include GTA not Template:GTA.
Latest News
Includes a page from the MediaWiki namespace. Same as {{mediaWiki:GTA}}, but also doesn't show up under Templates used on this page. Rendered as <GTA> if MediaWiki:GTA doesn't exist.

|}<noinclude>{{protected template}} {{Col-begin/doc}}</noinclude>

Includes the wikitext (markup, raw code) of a page. Does not render the page.
{{subst:GTA}} -- The content of the mentioned page is copied into this page. The include tag is replaced by the markup of the target page. The template will appear to show as normal, but changes to the template will not affect this page.


Magic Word Example Description
{{DISPLAYTITLE:GTA}} -- Changes a page's title, as displayed at in the header at the top of the page
{{CONTENTLANGUAGE}} en The ID Code of the site's default interface language
#REDIRECT [[Page]] -- Automatically redirects this page to another. Cannot be used to redirect across wikis. Cannot redirect more than once at a time. Redirects can be ignored with &redirect=no on the URL.
[[Category:category_name|sort_key]] [[Category:Characters|Johnson, Carl]]

[[Category:Grand Theft Auto IV|Missions]]
When a page is listed on a category page, it will be sorted and listed in alphabetical order. That can be overridden by adding a sort key, which sorts this example for Carl Johnson under J rather than under C, which is useful for Surnames.
This can also be used to eliminate repetition in titles, such as changing Missions in GTA IV to be listed as "Missions".

A magic word is a keyword or phrase recognized by MediaWiki software (on which Fandom is built), which triggers the software to do something special on the page. When editing in the visual editor, magic words on the page will show up as a green puzzle piece.


An example of magic word input and rendering


  • To add a magic word, simply add the magic word to the content of the page somewhere. It will look like code, but after you save (or preview), it will work as intended.
    • Magic words can be added in either editor (source or visual); however, source mode must be used to edit a magic word. Alternatively, in the visual editor, you can simply remove the magic word you wish to change and add the new one.

Common Magic Words

Here are some of the magic words used most commonly at Fandom:

  • __NOTOC__ hides the table of contents on a page.
  • __TOC__ places the table of contents exactly where this is entered. It overrides the NOTOC switch.
  • __NOWYSIWYG__, disables the rich text editor on a page.
  • {{CURRENTDAYNAME}} produces the current day of the week.
  • {{NUMBEROFARTICLES}} shows the number of articles on your community.
  • {{SITENAME}} produces the name of the community.
  • {{PAGENAME}} produces the name of the page the word is placed on.
  • {{FULLPAGENAME}} produces the entire page name, i.e. along with the namespace, of the page it is placed on.

Full list of Magic Words

For a full list of available magic words, see the Magic words help page on MediaWiki. [1]

Fandom-Specific Magic Words

Some extensions or features unique to Fandom also have magic words associated with them. Here is a comprehensive list:

Wiki Navigation

These magic words will fill in data for your community's navigation bar. To utilize them, these must be placed on the MediaWiki:Wiki-navigation page:

  1. categoryX#—where X is a number greater than 0. This gets the top 8 pages from the X biggest category on a wiki.
  2. category-Foo#-gets the top 8 pages from Category:Foo.
  3. visited#—populates a list of the top visited pages from MediaWiki:Most popular articles.
  4. newlychanged#—gets recently edited pages.
  5. topusers#—gets a list of the most active users.

Category Galleries

These magic words will apply to the Category Gallery feature when left on a Category page:

  • __NOCATEGORYGALLERY__ - Hides a category gallery from being rendered on a category page.
  • __FORCECATEGORYGALLERY__ - If the category gallery is enabled on a community, but it is not applied to all categories by default, this will add a category gallery to the category page.


  1. Some magic words may function differently, or not work, at Wikia. This occurs because the version of the MediaWiki software used by Wikia is not always the same version as those of either or

See also

Further help and feedback

Also on Fandom

Random Wiki