Template:Foo

From MidrangeWiki
Revision as of 17:33, 22 August 2006 by MrDolomite (talk | contribs) (created for testing of magic words in template space)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Page names and related info

Word Example Explanation
{{PAGENAME}} Foo Returns the name of the current page, including all levels (Title/Subtitle).
{{PAGENAMEE}} Foo More URL-friendly percent encoded special characters (To use an articlename in an external link).
{{SUBPAGENAME}}
{{SUBPAGENAMEE}}
Foo
Foo
[MW1.6+] Name of the current page, excluding parent pages ("Subtitle" on "Title/Subtitle") in namespaces supporting subpages, see Help:Link.
{{BASEPAGENAME}}
{{BASEPAGENAMEE}}
Foo
Foo
[MW1.7+] The basename of a subpage ("Title" on "Title/Subtitle"), see Help:Link.
{{NAMESPACE}}
{{NAMESPACEE}}
Template
Template
Returns the name of the namespace the current page resides in.
{{FULLPAGENAME}}
{{FULLPAGENAMEE}}
Template:Foo
Template:Foo
[MW1.6+] Shorthands for NAMESPACE+PAGENAME
{{TALKSPACE}}
{{TALKSPACEE}}
Template talk
Template_talk
[MW1.7+] Name of next odd namespace (e.g. 4 => 5)
{{SUBJECTSPACE}}
{{SUBJECTSPACEE}}
Template
Template
[MW1.7+] Name of next even namespace (e.g. 5 => 4)
{{ARTICLESPACE}}
{{ARTICLESPACEE}}
Template
Template
[MW1.7+] An alias for SUBJECTSPACE(E)
{{TALKPAGENAME}}
{{TALKPAGENAMEE}}
Template talk:Foo
Template_talk:Foo
[MW1.7+] FULLPAGENAME in its TALKSPACE
{{SUBJECTPAGENAME}}
{{SUBJECTPAGENAMEE}}
Template:Foo
Template:Foo
[MW1.7+] FULLPAGENAME in its SUBJECTSPACE
{{ARTICLEPAGENAME}}
{{ARTICLEPAGENAMEE}}
Template:Foo
Template:Foo
[MW1.7+] An alias for SUBJECTPAGENAME(E)
{{REVISIONID}} 6959 [MW1.5+] The unique identifying number of a page, see Help:Diff.
{{SITENAME}} MidrangeWiki Value of Template:H:mwg.
{{SERVER}} https://wiki.midrange.com Value of Template:H:mwg
{{SCRIPTPATH}} [MW1.5+] Template:H:mwg
{{SERVERNAME}} wiki.midrange.com [MW1.5+] Template:H:mwg

Namespaces

Variables Alternate syntax Name, linked to list of all pages Nr. of pages Notes
{{ns:-2}} {{ns:Media}} "Media"   pseudo-namespace for images and other files themselves, as opposed to the image description pages; see also below
{{ns:-1}} {{ns:Special}} "Special"   pseudo-namespace for special pages (list: Special:Specialpages)
{{ns:-0}} {{ns:Main}} main Template:PAGESINNS:0 main namespace, no prefix, or optionally a colon (this is needed when using the page as template)
{{ns:1}} {{ns:Talk}} Talk Template:PAGESINNS:1 see Help:Talk page for this and the following odd-numbered namespaces
{{ns:2}} {{ns:User}} User Template:PAGESINNS:2 logged-in users (list: Special:Listusers) have a user homepage User:username (linked to by the system from user names in lists of edits, e.g. on page histories, and from signatures on talk pages); this and subpages of it can be used to present oneself, for project-related bookmarks, and for drafts, tests, and other working material. One can put here material to give oneself one-step access to it from any page in the same project, and one can put here links to give oneself two-step access to the link targets from any page in the same project as the user page. For users who do not log in, the same applies, with the IP as username. Dynamic IPs are a complication.
{{ns:3}} {{ns:User_talk}} User talk Template:PAGESINNS:3  
{{ns:4}} {{ns:Project}} MidrangeWiki Template:PAGESINNS:4 the project namespace for matters about the project, such as guidelines and discussions; see also the Help namespace
{{ns:5}} {{ns:Project_talk}} MidrangeWiki talk Template:PAGESINNS:5  
{{ns:6}} {{ns:Image}} File Template:PAGESINNS:6 images and other uploaded files, with image description pages (list: Special:Imagelist)
{{ns:7}} {{ns:Image_talk}} File talk Template:PAGESINNS:7  
{{ns:8}} {{ns:MediaWiki}} MediaWiki Template:PAGESINNS:8 system messages (list: Special:Allmessages), editable by users, or if protected, by sysops
{{ns:9}} {{ns:MediaWiki_talk}} MediaWiki talk Template:PAGESINNS:9  
{{ns:10}} {{ns:Template}} Template Template:PAGESINNS:10 the default namespace for templates: the wikitext code {{name }} refers to and includes the page Template:name
{{ns:11}} {{ns:Template_talk}} Template talk Template:PAGESINNS:11  
{{ns:12}} {{ns:Help}} Help Template:PAGESINNS:12 typically used for the MediaWiki User's Guide, with the wikitext a frequently refreshed copy of the master version on Meta-Wikipedia, but with project-specific templates
{{ns:13}} {{ns:Help_talk}} Help talk Template:PAGESINNS:13  
{{ns:14}} {{ns:Category}} Category Template:PAGESINNS:14 each page (list: Special:Categories) represents a category of pages, with each category page displaying a list of pages in that category and optional additional text.
{{ns:15}} {{ns:Category_talk}} Category talk Template:PAGESINNS:15  
{{ns:16}} {{ns:16}} [1] Template:PAGESINNS:16