Editing
Help:Magic words
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Variables == {{Shortcut|CP:VAR}} {{Further|mw:Help:Magic words#Variables|Chabadpedia:Page name#sub}} {{Redirect|CP:VAR|policies and guidelines with CP:*VAR shortcuts, mostly about style matters|CP:VARS}} {{Redirect|CP:PAGENAME|the article naming policy|Chabadpedia:Article titles}} {| class="wikitable plainrowheaders" ! scope="col" | Page name variable ! scope="col" | Output ! scope="col" | Description |- ! scope="row" id="FULLPAGENAME" | <kbd>{<nowiki/>{FULLPAGENAME}}</kbd> | {{FULLPAGENAME}} | Canonical [[Help:page name|page name]]. ''Title line''. Title unless letter-case is altered with {{tld|DISPLAYTITLE}}.{{efn|If <kbd><nowiki>{{FULLPAGENAME}}</nowiki></kbd> is used in a page that is [[CP:transclusion|transcluded]] from another page, it will return the name of the target. {{ml|TEMPLATENAME|main}} can be used to determine the name of the template itself.}} |- ! scope="row" id="PAGENAME" | <kbd>{<nowiki/>{PAGENAME}}</kbd> | {{PAGENAME}} | Title line excluding [[Chabadpedia:Namespace|namespace]]. |- ! scope="row" id="BASEPAGENAME" | <kbd>{<nowiki/>{BASEPAGENAME}}</kbd> | {{BASEPAGENAME}} | Title of parent page, excluding namespace. |- ! scope="row" id="ROOTPAGENAME" | <kbd>{<nowiki/>{ROOTPAGENAME}}</kbd> | {{ROOTPAGENAME}} | Title of topmost parent (before all subpages), excluding namespace. |- ! scope="row" | <kbd>[[CP:pagename#sub|{<nowiki/>{SUBPAGENAME}}]]</kbd> | {{SUBPAGENAME}} | On a subpage, rightmost portion of ''current'' title; higher subpagenames show as [[Breadcrumb navigation|backlinks]]. |- ! scope="row" id="ARTICLEPAGENAME" | <kbd>{<nowiki/>{ARTICLEPAGENAME}}</kbd> | {{ARTICLEPAGENAME}} | rowspan="2" | Title of the subject page associated with the current page. These are useful on talk pages (but see note about Category talk pages). |- ! scope="row" id="SUBJECTPAGENAME" | <kbd>{<nowiki/>{SUBJECTPAGENAME}}</kbd> | {{SUBJECTPAGENAME}} |- ! scope="row" id="TALKPAGENAME" | <kbd>{<nowiki/>{TALKPAGENAME}}</kbd> | {{TALKPAGENAME}} | Title of the talk page associated with the current page. Useful on subject pages. |- ! scope="row" id="NAMESPACENUMBER" | <kbd>{<nowiki/>{NAMESPACENUMBER}}</kbd> | {{NAMESPACENUMBER:{{FULLPAGENAME}}}} | Number of the current page's namespace. |- ! scope="row" id="NAMESPACE" | <kbd>{<nowiki/>{NAMESPACE}}</kbd> | {{NAMESPACE}} | Namespace of the title. |- ! scope="row" id="ARTICLESPACE" | <kbd>{<nowiki/>{ARTICLESPACE}}</kbd> | {{ARTICLESPACE}} | rowspan="2" | On a talk page, the namespace part of the title of the associated subject page. |- ! scope="row" id="SUBJECTSPACE" | <kbd>{<nowiki/>{SUBJECTSPACE}}</kbd> | {{SUBJECTSPACE}} |- ! scope="row" id="TALKSPACE" | <kbd>{<nowiki/>{TALKSPACE}}</kbd> | {{TALKSPACE}} | Namespace of the talk page associated with the current page. |- ! scope="row" id="FULLPAGENAMEE" | {{longitem|style=line-height:1.5em|<kbd>{<nowiki/>{FULLPAGENAMEE}<nowiki/>}</kbd>,<br /><kbd>{<nowiki/>{PAGENAMEE}<nowiki/>}</kbd>,<br />{{pad|0.4em}}(etc.)}} | {{longitem|style=line-height:1.5em|{{FULLPAGENAMEE}},<br/>{{PAGENAMEE}},<br/>(etc.)}} | Adding an E to the end of the above variables, renders the above encoded for use in MediaWiki [[URL]]s (i.e. with underscores replacing spaces). |- ! scope="row" id="SHORTDESC" | <kbd>{<nowiki/>{SHORTDESC}}</kbd> | <!-- do not invoke this magic word here: shows nothing and places page in error-tracking category --> | Only works on the English Chabadpedia, where it displays a short description below the article title on mobile platforms. {{crossref|printworthy=y|See [[Chabadpedia:Short description]].}} |} {{a note}} The magic words above can also take a parameter, in order to parse values on a page other than the current page. A colon (<kbd>:</kbd>) is used to pass the parameter, rather than a pipe (<kbd>{{!}}</kbd>) that is used in templates, like <kbd><nowiki>{{MAGICWORD:value}}</nowiki></kbd>. For example, <kbd><nowiki>{{TALKPAGENAME:Chabadpedia:MOS}}</nowiki></kbd> returns <samp><nowiki>Chabadpedia talk:MOS</nowiki></samp> on any page. {{respond|orangeexclamation|Caution:}} Attempting to use (some) page name variables to create a wikilink to an image page, category page or interlanguage link will produce a different effect: this will respectively place the image on the page, add the page to the category, or create an interlanguage link at the edge of the page. To override this normal behavior, [[Help:Link|prefix the variable with a colon]] (<code>:</code>); for example <kbd><nowiki>[[:{{FULLPAGENAME}}]]</nowiki></kbd>. {{crossref|printworthy=y|For more details on parser functions that relate to page names and namespaces, see: {{section link|meta:Help:Page name#Variables and parser functions}}.}} {| class="wikitable plainrowheaders" ! scope="col" | Site variable ! scope="col" | Output ! scope="col" | Description |- ! scope="row" id="SITENAME" | <kbd>{<nowiki/>{SITENAME}}</kbd> | {{SITENAME}} | Site name ([[mw:Manual:$wgSitename|$wgSitename]]). |- ! scope="row" id="SERVER" | <kbd>{<nowiki/>{SERVER}}</kbd> | {{SERVER}} | Domain [[URL]] ([[mw:Manual:$wgServer|$wgServer]]). |- ! scope="row" id="SERVERNAME" | <kbd>{<nowiki/>{SERVERNAME}}</kbd> | {{SERVERNAME}} | Subdomain and domain name. |- ! scope="row" id="ARTICLEPATH" | <kbd>{<nowiki/>{ARTICLEPATH}}</kbd> | {{ARTICLEPATH}} | Relative article path ([[mw:Manual:$wgArticlePath|$wgArticlePath]]). |- ! scope="row" id="SCRIPTPATH" | <kbd>{<nowiki/>{SCRIPTPATH}}</kbd> | {{SCRIPTPATH}} | Relative script path ([[mw:Manual:$wgScriptPath|$wgScriptPath]]). |- ! scope="row" id="STYLEPATH" | <kbd>{<nowiki/>{STYLEPATH}}</kbd> | {{STYLEPATH}} | Relative style path ([[mw:Manual:$wgStylePath|$wgStylePath]]). |- ! scope="row" id="CURRENTVERSION" | <kbd>{<nowiki/>{CURRENTVERSION}}</kbd> | {{CURRENTVERSION}} | Returns current MediaWiki version. |} === Other variables by type === {| class="wikitable plainrowheaders" id="Current_date_and_time" |+ Current date and time ! scope="col" colspan="2" | Universal time ! scope="col" colspan="2" | Local-website time |- ! scope="col" | Variable ! scope="col" | Output ! scope="col" | Variable ! scope="col" | Output |- ! scope="row" id="CURRENTYEAR" | <kbd>{<nowiki/>{CURRENTYEAR}}</kbd> | {{CURRENTYEAR}} ! scope="row" id="LOCALYEAR" | <kbd>{<nowiki/>{LOCALYEAR}}</kbd> | {{LOCALYEAR}} |- ! scope="row" id="CURRENTMONTH" | <kbd>{<nowiki/>{CURRENTMONTH}}</kbd> | {{CURRENTMONTH}} ! scope="row" id="LOCALMONTH" | <kbd>{<nowiki/>{LOCALMONTH}}</kbd> | {{LOCALMONTH}} |- ! scope="row" id="CURRENTMONTHNAME" | <kbd>{<nowiki/>{CURRENTMONTHNAME}}</kbd> | {{CURRENTMONTHNAME}} ! scope="row" id="LOCALMONTHNAME" | <kbd>{<nowiki/>{LOCALMONTHNAME}}</kbd> | {{LOCALMONTHNAME}} |- ! scope="row" id="CURRENTMONTHABBREV" | <kbd>{<nowiki/>{CURRENTMONTHABBREV}}</kbd> | {{CURRENTMONTHABBREV}} ! scope="row" id="LOCALMONTHABBREV" | <kbd>{<nowiki/>{LOCALMONTHABBREV}}</kbd> | {{LOCALMONTHABBREV}} |- ! scope="row" id="CURRENTDAY" | <kbd>{<nowiki/>{CURRENTDAY}}</kbd>{{efn|<kbd><nowiki>{{CURRENTDAY}}</nowiki></kbd>, <kbd><nowiki>{{LOCALDAY}}</nowiki></kbd> and <kbd><nowiki>{{REVISIONDAY}}</nowiki></kbd> return the day (e.g. "<samp>6</samp>"), whilst <kbd><nowiki>{{CURRENTDAY2}}</nowiki></kbd>, <kbd><nowiki>{{LOCALDAY2}}</nowiki></kbd> and <kbd><nowiki>{{REVISIONDAY2}}</nowiki></kbd> return the day with zero-padding (e.g. "<samp>06</samp>"). For all two-digit days (i.e. 10 to 31), these are the same.|name=daynote}} | {{CURRENTDAY}} ! scope="row" id="LOCALDAY" | <kbd>{<nowiki/>{LOCALDAY}}</kbd>{{efn|name=daynote}} | {{LOCALDAY}} |- ! scope="row" id="CURRENTDAY2" | <kbd>{<nowiki/>{CURRENTDAY2}}</kbd>{{efn|name=daynote}} | {{CURRENTDAY2}} ! scope="row" id="LOCALDAY2" | <kbd>{<nowiki/>{LOCALDAY2}}</kbd>{{efn|name=daynote}} | {{LOCALDAY2}} |- ! scope="row" id="CURRENTDOW" | <kbd>{<nowiki/>{CURRENTDOW}}</kbd> | {{CURRENTDOW}} ! scope="row" id="LOCALDOW" | <kbd>{<nowiki/>{LOCALDOW}}</kbd> | {{LOCALDOW}} |- ! scope="row" id="CURRENTDAYNAME" | <kbd>{<nowiki/>{CURRENTDAYNAME}}</kbd> | {{CURRENTDAYNAME}} ! scope="row" id="LOCALDAYNAME" | <kbd>{<nowiki/>{LOCALDAYNAME}}</kbd> | {{LOCALDAYNAME}} |- ! scope="row" id="CURRENTTIME" | <kbd>{<nowiki/>{CURRENTTIME}}</kbd> | {{CURRENTTIME}} ! scope="row" id="LOCALTIME" | <kbd>{<nowiki/>{LOCALTIME}}</kbd> | {{LOCALTIME}} |- ! scope="row" id="CURRENTHOUR" | <kbd>{<nowiki/>{CURRENTHOUR}}</kbd> | {{CURRENTHOUR}} ! scope="row" id="LOCALHOUR" | <kbd>{<nowiki/>{LOCALHOUR}}</kbd> | {{LOCALHOUR}} |- ! scope="row" id="CURRENTWEEK" | <kbd>{<nowiki/>{CURRENTWEEK}}</kbd> | {{CURRENTWEEK}} ! scope="row" id="LOCALWEEK" | <kbd>{<nowiki/>{LOCALWEEK}}</kbd> | {{LOCALWEEK}} |- ! scope="row" id="CURRENTTIMESTAMP" | <kbd>{<nowiki/>{CURRENTTIMESTAMP}}</kbd>{{efn|name=formatstamp}} | {{CURRENTTIMESTAMP}} ! scope="row" id="LOCALTIMESTAMP" | <kbd>{<nowiki/>{LOCALTIMESTAMP}}</kbd>{{efn|name=formatstamp}} | {{LOCALTIMESTAMP}} |} {| class="wikitable plainrowheaders" id="Page_revision_data" |+ Page revision data ! scope="col" | Variable ! scope="col" | Output |- ! scope="row" id="REVISIONDAY" | <kbd>{<nowiki/>{REVISIONDAY}}</kbd>{{efn|name=daynote}} | {{REVISIONDAY}} |- ! scope="row" id="REVISIONDAY2" | <kbd>{<nowiki/>{REVISIONDAY2}}</kbd>{{efn|name=daynote}} | {{REVISIONDAY2}} |- ! scope="row" id="REVISIONMONTH" | <kbd>{<nowiki/>{REVISIONMONTH}}</kbd> | {{REVISIONMONTH}} |- ! scope="row" id="REVISIONYEAR" | <kbd>{<nowiki/>{REVISIONYEAR}}</kbd> | {{REVISIONYEAR}} |- ! scope="row" id="REVISIONTIMESTAMP" | <kbd>{<nowiki/>{REVISIONTIMESTAMP}}</kbd>{{efn|These timestamp outputs can be formatted with {{tl|Format revisiontimestamp}} (aka {{tl|FRTS}}). For example, <nowiki>{{</nowiki>[[Template:FRTS|FRTS]]<nowiki>|{{REVISIONTIMESTAMP}}}}</nowiki> turns "{{REVISIONTIMESTAMP}}" into "{{FRTS|{{REVISIONTIMESTAMP}}}}".|name=formatstamp}} | {{REVISIONTIMESTAMP}} |- ! scope="row" id="REVISIONUSER" | <kbd>{<nowiki/>{REVISIONUSER}}</kbd>{{efn|This shows the last user to edit the page. There is no way to show the user viewing the page with magic words due to technical restrictions.}} | {{REVISIONUSER}} |} {| class="wikitable plainrowheaders" |+ Wiki statistics |- ! scope="row" id="NUMBEROFPAGES" | <kbd>{<nowiki/>{NUMBEROFPAGES}}</kbd> | {{NUMBEROFPAGES}} |- ! scope="row" id="NUMBEROFARTICLES" | <kbd>{<nowiki/>{NUMBEROFARTICLES}}</kbd> | {{NUMBEROFARTICLES}} |- ! scope="row" id="NUMBEROFFILES" | <kbd>{<nowiki/>{NUMBEROFFILES}}</kbd> | {{NUMBEROFFILES}} |- ! scope="row" id="NUMBEROFEDITS" | <kbd>{<nowiki/>{NUMBEROFEDITS}}</kbd> | {{NUMBEROFEDITS}} <!--disabled in MediaWiki (see talk page): |- ! scope="row" id="NUMBEROFVIEWS | <kbd>{<nowiki/>{NUMBEROFVIEWS}}</kbd> | {{NUMBEROFVIEWS}} --> |- ! scope="row" id="NUMBEROFUSERS" | <kbd>{<nowiki/>{NUMBEROFUSERS}}</kbd> | {{NUMBEROFUSERS}} |- ! scope="row" id="NUMBEROFADMINS" | <kbd>{<nowiki/>{NUMBEROFADMINS}}</kbd> | {{NUMBEROFADMINS}} |- ! scope="row" id="NUMBEROFACTIVEUSERS" | <kbd>{<nowiki/>{NUMBEROFACTIVEUSERS}}</kbd> | {{NUMBEROFACTIVEUSERS}} |}
Edit summary
(Briefly describe your changes)
Please note that all contributions to Chabadpedia are considered to be released under the GNU Free Documentation License 1.3 or later (see
Chabadpedia:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Category:Chabadpedia pages with incorrect protection templates
Category:Pages with missing files
Category:Pages with script errors
Category:Pages with syntax highlighting errors
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Help page
Discussion
English
Views
Read
Edit source
View history
More
Navigation
Main page
Recent changes
Random page
Tools
What links here
Related changes
Special pages
Page information