This is a mirror of discontinued 'WikiDevi'. Enjoy!

Help:Variables

From DeviWiki (ex WikiDevi)
Jump to navigation Jump to search

Variables return information about the current page, wiki, or date.

Their syntax is similar to Help:Templates.

Date and time

The following variables return the current date and time in UTC.

Due to software and browser caching, these variables frequently show

when the page was cached rather than the current time.
Variable Output Description
{{CURRENTYEAR}} 2025 Year
{{CURRENTMONTH}} 07 Month (zero-padded number)
{{CURRENTMONTHNAME}} July Month (name
{{CURRENTMONTHNAMEGEN}} July Month (genitive form)
{{CURRENTMONTHABBREV}} Jul Month (abbreviation)
{{CURRENTDAY}} 9 Day of the month (unpadded number)
{{CURRENTDAY2}} 09 Day of the month (zero-padded number)
{{CURRENTDOW}} 3 Day of the week (unpadded number)
{{CURRENTDAYNAME}} Wednesday Day of the week (name)
{{CURRENTTIME}} 01:04 Time (24-hour HH:mm format)
{{CURRENTHOUR}} 01 Hour (24-hour zero-padded number)
{{CURRENTWEEK}} 28 Week (number)
{{CURRENTTIMESTAMP}} 20250709010438 YYYYMMDDHHmmss timestamp

Technical metadata

Revision variables return data about the latest edit to the current page,

even if viewing an older version of the page.

Site

Variable Output Description
{{SITENAME}} DeviWiki (ex WikiDevi) The wiki's site name
{{SERVER}} https://deviwiki.com domain URL
{{SERVERNAME}} deviwiki.com domain name
{{SCRIPTPATH}} /w relative script path
{{STYLEPATH}} /w/skins relative style path
{{CURRENTVERSION}} 1.35.6 The wiki's MediaWiki version.
{{CONTENTLANGUAGE}}
{{CONTENTLANG}}
en
en
The wiki's default interface language

Latest revision to current page

Variable Output Description
{{REVISIONID}} 150782 Unique revision ID
{{REVISIONDAY}} 5 Day edit was made (unpadded number)
{{REVISIONDAY2}} 05 Day edit was made (zero-padded number)
{{REVISIONMONTH}} 06 Month edit was made (zero-padded number)
{{REVISIONYEAR}} 2016 Year edit was made
{{REVISIONTIMESTAMP}} 20160605030351 Timestamp as of time of edit
{{REVISIONUSER}} imported>Omega The username of the user who made the most recent edit to the page,
or the current user when previewing an edit

Statistics

Numbers returned by these variables normally contain separators (commas or spaces,

depending on the local language), but can return raw numbers with the ":R" flag
(for example, {{NUMBEROFPAGES}} → 30,779 and {{NUMBEROFPAGES:R}} → 30779).

Use "|R" for magic words that require a parameter like PAGESINCATEGORY

(for example {{PAGESINCATEGORY:Help}} and {{PAGESINCATEGORY:Help|R}}).
Variable Output Description
{{NUMBEROFPAGES}} 30,779 Number of wiki pages.
{{NUMBEROFARTICLES}} 13,565 Number of pages in content namespaces.
{{NUMBEROFFILES}} 8,427 Number of uploaded files.
{{NUMBEROFEDITS}} 175,318 Number of page edits.
{{NUMBEROFVIEWS}} Template:NUMBEROFVIEWS Number of page views. Usually useless on a wiki using caching.
{{NUMBEROFUSERS}} 60 Number of registered users.
{{NUMBEROFADMINS}} 1 Number of users in the administrator group.
{{NUMBEROFACTIVEUSERS}} 0 Number of active users, based on the criteria used in Special:Statistics.
{{NUMBERINGROUP:groupname}}
{{NUMINGROUP:groupname}}
1
1
({{NUMBERINGROUP:bureaucrat}} used here)
Number of users in a specific group.

Namespaces

Variable Output Description
{{NAMESPACE}} Help Name of the page's namespace
{{SUBJECTSPACE}}
{{ARTICLESPACE}}
Help
Help
Name of the associated content namespace
{{TALKSPACE}} Help talk Name of the associated talk namespace

The following are equivalents encoded for use in URLs (spaces replaced

with underscores and some characters percent-encoded):
  • {{NAMESPACEE}}
  • {{SUBJECTSPACEE}}
  • {{TALKSPACEE}}

These can take a page name and will return the namespace of the page name parameter, instead of the current page's:

  • {{NAMESPACE:Template:Main Page}}Template
  • {{SUBJECTSPACE:Template:Main Page}}Template
  • {{TALKSPACE:Template:Main Page}}Template talk

Page names

Variable Output Description
{{FULLPAGENAME}} Help:Variables Namespace and page title.
{{PAGENAME}} Variables Page title.
{{BASEPAGENAME}} Variables Page title excluding the current subpage and namespace ("Title/foo" on "Title/foo/bar").
{{SUBPAGENAME}} Variables The subpage title ("foo" on "Title/foo").
{{SUBJECTPAGENAME}} Help:Variables The namespace and title of the associated content page.
{{TALKPAGENAME}} Help talk:Variables The namespace and title of the associated talk page.

The following are equivalents encoded for use in MediaWiki URLs

(i.e. spaces replaced with underscores and some characters percent-encoded):
  • {{FULLPAGENAMEE}}
  • {{PAGENAMEE}}
  • {{BASEPAGENAMEE}}
  • {{SUBPAGENAMEE}}
  • {{SUBJECTPAGENAMEE}}
  • {{TALKPAGENAMEE}}

These can all allow specification of the page to be operated on, instead of just the current page:

  • {{PAGENAME:Template:Main Page}}Main Page

See also https://en.wikibooks.org/wiki/Help:Variables