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!
== Parser functions == Parser functions are very similar to variables, but take one or more parameters (technically, any magic word that takes a parameter is a parser function), and the name is sometimes prefixed with a hash to distinguish them from templates. This page only describes parser functions that are integral to the MediaWiki software. Other parser functions may be added by MediaWiki extensions such as the {{mediawiki|Extension:ParserFunctions|ParserFunctions extension}}. For those see [[Help:Extension:ParserFunctions]]. === URL data === {| class="wikitable" |- ! {{Hl2}}| Parser function ! {{Hl2}}| Input → Output ! {{Hl2}}| Description ! {{Hl2}}| Versions |- | <code><nowiki>{{localurl:</nowiki>''page name''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{localurl:</nowiki>''page name''<nowiki>|</nowiki>''query_string''<nowiki>}}</nowiki></code> | <code><nowiki>{{localurl:MediaWiki}}</nowiki></code> → {{localurl:MediaWiki}} <br /><code><nowiki>{{localurl:MediaWiki|printable=yes}}</nowiki></code> → {{localurl:MediaWiki|printable=yes}} | The relative path to the title. | |- | <code><nowiki>{{fullurl:</nowiki>''page name''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{fullurl:</nowiki>''page name''<nowiki>|</nowiki>''query_string''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{fullurl:</nowiki>''interwiki:remote page name''<nowiki>|</nowiki>''query_string''<nowiki>}}</nowiki></code> | <code><nowiki>{{fullurl:Category:Top level}}</nowiki></code> → {{fullurl:Category:Top level}} <br /> <code><nowiki>{{fullurl:Category:Top level|action=edit}}</nowiki></code> → {{fullurl:Category:Top level|action=edit}} | A protocol-relative path to the title. This will also resolve [[Manual:Interwiki|interwiki]] prefixes. '''Note:''' Unbracketed (plain) protocol-relative links are not automagically linked. | 1.5+ |- | <code><nowiki>{{canonicalurl:</nowiki>''page name''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{canonicalurl:</nowiki>''page name''<nowiki>|</nowiki>''query_string''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{canonicalurl:</nowiki>''interwiki:remote page name''<nowiki>|</nowiki>''query_string''<nowiki>}}</nowiki></code> | <code><nowiki>{{canonicalurl:Category:Top level}}</nowiki></code> → {{canonicalurl:Category:Top level}} <br /> <code><nowiki>{{canonicalurl:Category:Top level|action=edit}}</nowiki></code> → {{canonicalurl:Category:Top level|action=edit}} | The absolute path to the title, using the canonical URL. This will also resolve [[Manual:Interwiki|interwiki]] prefixes. | 1.18+ |- | <code><nowiki>{{filepath:</nowiki>''file name''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{filepath:</nowiki>''file name''<nowiki>|nowiki}}</nowiki></code> <br /><code><nowiki>{{filepath:</nowiki>''file name''<nowiki>|</nowiki>''thumbnail_size''<nowiki>}}</nowiki></code> | <code><nowiki>{{filepath:Wiki.png}}</nowiki></code> → {{filepath:Wiki.png}} <br /> <code><nowiki>{{filepath:Wiki.png|nowiki}}</nowiki></code> → {{filepath:Wiki.png|nowiki}} <br /> <code><nowiki>{{filepath:Example.svg|300}}</nowiki></code> → {{filepath:Example.svg|300}} <br /> | A protocol-relative path to the full size or thumbnail ({{mediawiki|rev:80813|1.18+}}) of a media file. | {{mediawiki|rev:25854|1.12+}} <br />{{mediawiki|rev:80813|1.18+}} |- | <code><nowiki>{{urlencode:</nowiki>''string''<nowiki>}}</nowiki></code> (or <code><nowiki>{{urlencode:</nowiki>''string''<nowiki>|QUERY}}</nowiki></code>) <br /><code><nowiki>{{urlencode:</nowiki>''string''<nowiki>|WIKI}}</nowiki></code> <br /><code><nowiki>{{urlencode:</nowiki>''string''<nowiki>|PATH}}</nowiki></code> | <code><nowiki>{{urlencode:x y z á é}}</nowiki></code> (or <code><nowiki>{{urlencode:x y z á é|QUERY}})</nowiki></code> → {{urlencode:x y z á é}} <br /><code><nowiki>{{urlencode:x y z á é|WIKI}}</nowiki></code> → x_y_z_%C3%A1_%C3%A9 <br /><code><nowiki>{{urlencode:x y z á é|PATH}}</nowiki></code> → x%20y%20z%20%C3%A1%20%C3%A9 Note that the default changed from <code>|WIKI</code> to <code>|QUERY</code> in 1.17; this may break templates that rely on this function. | The input encoded for use in URLs. Note that there is no urldecode function like there is in the obsolete [[Extension:StringFunctions]]. | {{mediawiki|rev:14273|1.7+}} (or {{mediawiki|rev:64726|1.17+}})<br />{{mediawiki|rev:64726|1.17+}}<br />{{mediawiki|rev:64726|1.17+}} |- | <code><nowiki>{{anchorencode:</nowiki>''string''<nowiki>}}</nowiki></code> | <code><nowiki>{{anchorencode:x y z á é}}</nowiki></code> → {{anchorencode:x y z á é}} | The input encoded for use in URL section anchors (after the “#” symbol in a URL). | {{mediawiki|rev:16279|1.8+}} |} === Namespaces === <code><nowiki>{{ns:}}</nowiki></code> returns the current localized name for the [[Help:Namespace|namespace]] with that index, canonical name, or local alias. Thus <code><nowiki>{{ns:6}}</nowiki></code>, <code><nowiki>{{ns:File}}</nowiki></code>, and <code><nowiki>{{ns:Image}}</nowiki></code> (an old name for the File namespace) all return "{{ns:6}}". On a wiki where the content language was French, <code><nowiki>{{ns:Fichier}}</nowiki></code> would also be valid, but <code><nowiki>{{ns:Datei}}</nowiki></code> (the localisation of "File" into German) would not. <code><nowiki>{{nse:}}</nowiki></code> is the equivalent encoded for MediaWiki URLs. It does the same, but it replaces spaces with underscores, making it usable in external links. {| class="wikitable" |- ! {{hl3}} colspan="2" width="50%" | Content namespaces ! rowspan="12" | ! {{hl3}} colspan="2" width=%50%" | Talk namespaces |- ! {{Hl2}}| Usage ! {{Hl2}}| Output ! {{Hl2}}| Usage ! {{Hl2}}| Output |- | <code><nowiki>{{ns:-2}}</nowiki></code> or <code><nowiki>{{ns:Media}}</nowiki></code> | {{ns:-2}} || || |- | <code><nowiki>{{ns:-1}}</nowiki></code> or <code><nowiki>{{ns:Special}}</nowiki></code> | {{ns:-1}} || || |- | <code><nowiki>{{ns:0}}</nowiki></code> or <code><nowiki>{{ns:}}</nowiki></code> | {{ns:}} | <code><nowiki>{{ns:1}}</nowiki></code> or <code><nowiki>{{ns:Talk}}</nowiki></code> | {{ns:1}} |- | <code><nowiki>{{ns:2}}</nowiki></code> or <code><nowiki>{{ns:User}}</nowiki></code> | {{ns:2}} | <code><nowiki>{{ns:3}}</nowiki></code> or <code><nowiki>{{ns:User talk}}</nowiki></code> | {{ns:3}} |- | <code><nowiki>{{ns:4}}</nowiki></code> or <code><nowiki>{{ns:Project}}</nowiki></code> | {{ns:4}}<br>''varies between wikis'' | <code><nowiki>{{ns:5}}</nowiki></code> or <code><nowiki>{{ns:Project talk}}</nowiki></code> | {{ns:5}} |- | <code><nowiki>{{ns:6}}</nowiki></code> or <code><nowiki>{{ns:File}}</nowiki></code> or <code><nowiki>{{ns:Image}}</nowiki></code> | {{ns:6}} | <code><nowiki>{{ns:7}}</nowiki></code> or <code><nowiki>{{ns:File talk}}</nowiki></code> or <code><nowiki>{{ns:Image talk}}</nowiki></code> | {{ns:7}} |- | <code><nowiki>{{ns:8}}</nowiki></code> or <code><nowiki>{{ns:MediaWiki}}</nowiki></code> | {{ns:8}} | <code><nowiki>{{ns:9}}</nowiki></code> or <code><nowiki>{{ns:MediaWiki talk}}</nowiki></code> | {{ns:9}} |- | <code><nowiki>{{ns:10}}</nowiki></code> or <code><nowiki>{{ns:Template}}</nowiki></code> | {{ns:10}} | <code><nowiki>{{ns:11}}</nowiki></code> or <code><nowiki>{{ns:Template talk}}</nowiki></code> | {{ns:11}} |- | <code><nowiki>{{ns:12}}</nowiki></code> or <code><nowiki>{{ns:Help}}</nowiki></code> | {{ns:12}} | <code><nowiki>{{ns:13}}</nowiki></code> or <code><nowiki>{{ns:Help talk}}</nowiki></code> | {{ns:13}} |- | <code><nowiki>{{ns:14}}</nowiki></code> or <code><nowiki>{{ns:Category}}</nowiki></code> | {{ns:14}} | <code><nowiki>{{ns:15}}</nowiki></code> or <code><nowiki>{{ns:Category talk}}</nowiki></code> | {{ns:15}} |} === Formatting === <!-- Well gosh, with the source of the examples hidden, who can tell what you are inputting without looking here in the source? --> {| class="wikitable" ! {{Hl2}}| Usage ! {{Hl2}}| Input → Output ! {{Hl2}}| Description ! {{Hl2}}| Version |- |- | <code><nowiki>{{formatnum:</nowiki>''unformatted num''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{formatnum:</nowiki>''formatnum-formatted num''<nowiki>|R}}</nowiki></code> | <code><nowiki>{{formatnum:987654321.654321}}</nowiki></code> <br/> → {{formatnum:987654321.654321}} <br /> <code><nowiki>{{formatnum:987,654,321.654321|R}}</nowiki></code> <br/> → {{formatnum:987,654,321.654321|R}} <br /> <code><nowiki>{{formatnum:{{formatnum:987654321.654321}}|R}}</nowiki></code><br/> → 987654321.654321 (on any locale) <br /> <code><nowiki>{{formatnum:00001}}</nowiki></code> <br/> → {{formatnum:00001}} ---- Unsupported: <br /> <code><nowiki>{{formatnum:{{formatnum:987.654.321}}}}</nowiki></code> <br/> → 987 654 321 (e.g. with Italian locale) ---- Examples of wrong input (unreliable output), with or without <code>|R</code>: <br /> <code><nowiki>{{formatnum:987,654.321|R}}</nowiki></code> (the least broken) <br/> <code><nowiki>{{formatnum:987.654,321|R}}</nowiki></code> <br/> <code><nowiki>{{formatnum:987 654,321|R}}</nowiki></code> <br/> <code><nowiki>{{formatnum:987&nbsp;654,321|R}}</nowiki></code> | Takes an unformatted number (arab, no group separators and <code>.</code> as decimal separator) and outputs it in the localized digit script and formatted with decimal and decimal group separators, according to the wiki's default locale. <br /> The <code><nowiki>|</nowiki>R</code> parameter can be used to reverse the behaviour, for use in mathematical situations: it's reliable and should be used only to deformat numbers who are known to be formatted exactly as formatnum formats them with the wiki's locale. <br/> <small>{{warning}}Leading zeroes are not removed, you can use <nowiki>{{#expr:00001}}</nowiki> instead if you have [[Extension:ParserFunctions]] installed.</small> <br/> <small>{{warning}} If you don't input numbers in the exact format required, don't expect any reliable output, especially on non-English wikis.</small> ---- If you really need to format (according the wiki's locale) a number in unknown input format, you could try and use <code>formatnum</code> two times (but not if it can have a decimal group, or its separator will be eaten or the number won't be formatted). | 1.7+ <br />{{mediawiki|rev:32012|1.13+}} |- | <code><nowiki>{{#dateformat:</nowiki>''date''<nowiki>}} {{#formatdate:</nowiki>''date''<nowiki>}} {{#dateformat:</nowiki>''date''{{!}}''format''<nowiki>}} {{#formatdate:</nowiki>''date''{{!}}''format''<nowiki>}}</nowiki></code> | <code><nowiki>{{#dateformat:25 deC 2009|ymd}}</nowiki></code> <br/> → {{#dateformat:25 deC 2009|ymd}} (your pref), 2009 DeC 25 (default) <br/> <code><nowiki>{{#formatdate:dec 25,2009|dmy}}</nowiki></code> <br/> → {{#formatdate:dec 25,2009|dmy}} (your pref), 25 Dec 2009 (default) <br/> <code><nowiki>{{#dateformat:2009-12-25|mdy}}</nowiki></code> <br/> → {{#dateformat:2009-12-25|mdy}} (your pref), December 25, 2009 (default) <br/> <code><nowiki>{{#formatdate:2009 dec 25|ISO 8601}}</nowiki></code> <br/> → {{#formatdate:2009 dec 25|ISO 8601}} (your pref), 2009-12-25 (default) <br/> <code><nowiki>{{#dateformat:25 decEmber|mdy}}</nowiki></code> <br/> → {{#dateformat:25 decEmber|mdy}} (your pref), DecEmber 25 (default) <br/> Note: In the example hereinbefore, "your pref" refers to your date preference on the current MediaWiki wiki only. | Formats an unlinked date based on user "date format" preference, and adds metadata tagging it as a formatted date. For logged-out users and those who have not set a date format in their preferences, dates can be given a default: <code>mdy</code>, <code>dmy</code>, <code>ymd</code>, <code>ISO 8601</code> (all case sensitive). If only the month and day are given, only <code>mdy</code> and <code>dmy</code> are valid. If a format is not specified or is invalid, the input format is used as a default. If the supplied date is not recognized as a valid date (specifically, if it contains any metadata such as from a nested use of these or similar templates), it is rendered unchanged, and no (additional) metadata is generated. <br/><small>{{warning}}Although the ISO 8601 standard requires that dates be in the Gregorian calendar, the ISO parameter in this function will still format dates that fall outside the usual Gregorian range (e.g. dates prior to 1583). Also, the magic word cannot properly convert between negative years (used with ISO 8601) and years BC or years BCE (used in general writing).</small> | {{mediawiki|rev:48249|1.15+}} |- | <code><nowiki>{{lc:</nowiki>''string''<nowiki>}}</nowiki></code> | <code><nowiki>{{lc:DATA CENTER}}</nowiki></code> → {{lc:DATA CENTER}} | The lowercase input. | 1.5+ |- | <code><nowiki>{{lcfirst:</nowiki>''string''<nowiki>}}</nowiki></code> | <code><nowiki>{{lcfirst:DATA center}}</nowiki></code> → {{lcfirst:DATA center}} | The input with the <u>very first</u> character lowercase. | 1.5+ |- | <code><nowiki>{{uc:</nowiki>''string''<nowiki>}}</nowiki></code> | <code><nowiki>{{uc:text transform}}</nowiki></code> → {{uc:text transform}} | The uppercase input. | 1.5+ |- | <code><nowiki>{{ucfirst:</nowiki>''string''<nowiki>}}</nowiki></code> | <code><nowiki>{{ucfirst:text TRANSFORM}}</nowiki></code> → {{ucfirst:text TRANSFORM}} | The input with the <u>very first</u> character uppercase. | 1.5+ |- | <code><nowiki>{{padleft:xyz|</nowiki>''stringlength''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{padleft:xyz|</nowiki>''strlen''<nowiki>|</nowiki>''char''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{padleft:xyz|</nowiki>''strlen''<nowiki>|</nowiki>''string''<nowiki>}}</nowiki></code> | <code><nowiki>{{padleft:xyz|5}}</nowiki></code> → {{padleft:xyz|5}} <br /> <code><nowiki>{{padleft:xyz|5|_}}</nowiki></code> → {{padleft:xyz|5|_}} <code><nowiki>{{padleft:xyz|5|abc}}</nowiki></code> → {{padleft:xyz|5|abc}} <code><nowiki>{{padleft:xyz|2}}</nowiki></code> → {{padleft:xyz|2}} <br /> <code><nowiki>{{padleft:|1|xyz}}</nowiki></code> → {{padleft:|1|xyz}} (first character of the string) <br /> | Inserts a string of padding characters (character chosen in third parameter; default "0") of a specified length (second parameter) next to a chosen base character or variable (first parameter). The final digits or characters in the base replace the final characters in the padding; i.e. <code><nowiki>{{padleft:44|3|0}}</nowiki></code> produces {{padleft:44|3}}. The padding string may be truncated if its length does not evenly divide the required number of characters. <br />'''{{mediawiki|bugzilla:16852|Bug}} (fixed in {{mediawiki|rev:45734|r45734}}):''' multibyte characters are interpreted as two characters, which can skew width. These also cannot be used as padding characters. | 1.8+ |- | <code><nowiki>{{padright:xyz|</nowiki>''stringlength''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{padright:xyz|</nowiki>''strlen''<nowiki>|</nowiki>''char''<nowiki>}}</nowiki></code> <br /><code><nowiki>{{padright:xyz|</nowiki>''strlen''<nowiki>|</nowiki>''string''<nowiki>}}</nowiki></code> | <code><nowiki>{{padright:xyz|5}}</nowiki></code> → {{padright:xyz|5}} <br /> <code><nowiki>{{padright:xyz|5|_}}</nowiki></code> → {{padright:xyz|5|_}} <code><nowiki>{{padright:xyz|5|abc}}</nowiki></code> → {{padright:xyz|5|abc}} <code><nowiki>{{padright:xyz|2}}</nowiki></code> → {{padright:xyz|2}} <br /> <code><nowiki>{{padright:|1|xyz}}</nowiki></code> → {{padright:|1|xyz}} <br /> | Identical to padleft, but adds padding characters to the right side. | |} '''See also:''' [[Extension:StringFunctions]]. === Localisation === Here are the magic words which are used as main localisation tools. Other magic words will often depend on the wiki's locale and configuration or on the chosen language: see in particular [[#Date and time]], [[#Formatting]], [[#Miscellaneous]]. More magic words are added by the [[Extension:Translate|Translate extension]]. The usage of these magic words can be very complex, and the documentation is currently incomplete; there's some more info on [[translatewiki:FAQ#PLURAL|PLURAL]], [[translatewiki:Grammar|GRAMMAR]], [[translatewiki:Gender|GENDER]]. {| class="wikitable" ! {{Hl2}}| Usage ! {{Hl2}}| Input → Output ! {{Hl2}}| Description ! {{Hl2}}| Version |- |- |- | <code><nowiki>{{plural:2|</nowiki>''is''<nowiki>|</nowiki>''are''<nowiki>}}</nowiki></code> | <code><nowiki>{{plural:0|is|are}}</nowiki></code> → {{plural:0|is|are}} <br /> <code><nowiki>{{plural:1*1|is|are}}</nowiki></code> → {{plural:1*1|is|are}} <br /> <code><nowiki>{{plural:21 mod 10|is|are}}</nowiki></code> → {{plural:21 mod 10|is|are}} <br /> <code><nowiki>{{plural:{{#expr:21 mod 10}}|is|are}}</nowiki></code> → {{plural:{{#expr:21 mod 10}}|is|are}} <br /> <code><nowiki>{{plural:1|is|are}}</nowiki></code> → {{plural:1|is|are}} <br /> <code><nowiki>{{plural:2|is|are}}</nowiki></code> → {{plural:2|is|are}} <br /> (For [[:w:Polish language|Polish]]) <br /><code><nowiki>{{plural:2|milion|miliony|milionów}}</nowiki></code> → miliony | Outputs the singular form (second parameter) if the first parameter is an expression equalling one; the plural form (third parameter) otherwise. Its functioning is [[m:Help:Magic_words#Language-dependent_word_conversions|language-dependent]]. Plural transformations are used for languages like Russian based on "count mod 10". You should not expect this to handle fractions (like 44.5) — see [[bugzilla:28128|bug 28128]]. | |- | <code><nowiki>{{grammar:N|</nowiki>''noun''<nowiki>}}</nowiki></code> | | Outputs the correct inflected form of the given word described by the inflection code after the colon ([[m:Help:Magic_words#Language-dependent_word_conversions|language-dependent]]). Grammar transformations are used for inflected languages like Polish. See also {{mediawiki|Manual:$wgGrammarForms}}. | 1.7+ |- | <code><nowiki>{{gender:</nowiki>''username'' <br /><nowiki>|</nowiki>''return text if user is male'' <br /><nowiki>|</nowiki>''return text if user is female'' <br /><nowiki>|</nowiki>''return text if user hasn't defined their gender''<nowiki>}}</nowiki></code> | ''(Depends on the named user's gender)'' | A switch for the gender set in [[Special:Preferences]]. <br/> Note: If 3rd parameter is omitted and user hasn't defined his/her gender, then <code>''text if user is male''</code> is returned. | {{mediawiki|rev:46247|1.15+}} |- | <code><nowiki>{{int:</nowiki>''message name''<nowiki>}}</nowiki> | <code><nowiki>{{int:</nowiki>edit<nowiki>}}</nowiki></code> → '''{{int:edit}}''' <br /><small>''(depends on user language; try: [{{fullurl:{{FULLPAGENAME}}|uselang=fr}}#Localisation fr] • [{{fullurl:{{FULLPAGENAME}}|uselang=ja}}#Localisation ja])''</small> | Internationalizes (translates) the given '''int'''erface (MediaWiki namespace) message into the user language. For <code>msgnw</code> and other transclusion magic words, see [[m:Help:Magic words#Template modifiers]]. ''Note that this can damage / confuse cache consistency in MediaWiki 1.17 and earlier, see [[bugzilla:14404|bug 14404]].'' | |- | <code><nowiki>{{int:editsectionhint|MediaWiki}}</nowiki> | <code><nowiki>{{int:editsectionhint|MediaWiki}}</nowiki></code> → '''{{int:editsectionhint|MediaWiki}}''' | You may also use parameters with translations. <br />Parameters are designated in messages with: $1, $2, $3, etc. <br />For example, here is the message for ''editsectionhint'': Edit section: $1 <br />In this example, MediaWiki replaces $1. | |} === Miscellaneous === {| class="wikitable plainlinks" ! {{Hl2}}| Usage ! {{Hl2}}| Output ! {{Hl2}}| Description ! {{Hl2}}| Version |- | <code><nowiki>{{#language:</nowiki>''language code''<nowiki>}}</nowiki></code> <br /> <code><nowiki>{{#language:ar}}</nowiki></code> <br /> <code><nowiki>{{#language:</nowiki>''language code''<nowiki>|</nowiki>''target language code''<nowiki>}}</nowiki></code> <br /> <code><nowiki>{{#language:ar|en}}</nowiki></code> | {{#language:language code}} <br />{{#language:ar}} <br />{{#language:language code|target language code}} <br />Arabic | The full name of the language for the given [[language code]]: native name (language autonym) by default, name translated in target language if a target language code is specified. | {{mediawiki|rev:14490|1.7+}} {{r|91875|1.18+}} (translation) |- | <code><nowiki>{{#special:</nowiki>''special page name''<nowiki>}}</nowiki> <br /><nowiki>{{#special:userlogin}}</nowiki></code> | {{#special:special page name}} <br />{{#special:userlogin}} | The localized name for the given canonical Special: page. | {{mediawiki|rev:17321|1.9+}} |- | <code><nowiki>{{#speciale:</nowiki>''special page name''<nowiki>}}</nowiki> <br /><nowiki>{{#speciale:userlogin}}</nowiki></code> | {{#speciale:special page name}} <br />{{#speciale:userlogin}} | The localized and URL-encoded name for the given canonical Special: page. | {{mediawiki|gerrit:4340|1.20+}} |- | <code><nowiki>{{#tag:</nowiki>''tagname'' <br/><nowiki>|</nowiki>''content'' <br/><nowiki>|</nowiki>''attribute1=value1'' <br /><nowiki>|</nowiki>''attribute2=value2''<br /><nowiki>}}</nowiki></code> | ''(Depends on parser tag)'' | Alias for XML-style MediaWiki parser tags or extension tags. It allows execution of wiki code and [[Extension:ParserFunctions|parser functions]] within tags before the tag is processed. It also prevents parsing of tags in conditional paths that aren't executed (like in <code>#if</code> statements). Content between tags is passed as the first parameter, and any attributes for the tags can be passed as subsequent parameters. This example: <code><tagname ''attribute1''="''value1''" ''attribute2''="''value2''"></code>''Your content goes here''<code></tagname></code> …can be rewritten like this: <code><nowiki>{{#tag:</nowiki></code>''tagname''<code><nowiki>|</nowiki></code>''Your content goes here''<code><nowiki>|</nowiki></code>''attribute1''=''value1''<code><nowiki>|</nowiki></code>''attribute2''=''value2''<code><nowiki>}}</nowiki></code> Example for the [[Extension:Cite|Cite extension]]'s <code><ref></code> tags: <code><nowiki>{{#tag:ref|Citation text goes here, and you can include parser functions like {{#expr: ... }} and magic words like {{PAGENAME}}.|name="multiple"}}</nowiki></code> <small>{{warning}}You must write <code><nowiki>{{#tag:</nowiki></code>''tagname''<code><nowiki>||</nowiki></code>''attribute1''=''value1''<code><nowiki>|</nowiki></code>''attribute2''=''value2''<code><nowiki>}}</nowiki></code> to pass an empty content. No space is permitted in the area reserved for content between the pipe characters {{!}}{{!}} before ''attribute1''.</small> | {{mediawiki|rev:29482|1.12+}} |} {{languages}} [[Category:Help|{{PAGENAME}}]] [[Category:Time|{{PAGENAME}}]] [[Category:Magic words|{{PAGENAME}}]]
Summary:
Please note that all contributions to Fanra's EverQuest Wiki are considered to be released under the Creative Commons Attribution Share Alike (see
Project: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!
To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Help page
Discussion
English
Views
Read
Edit source
View history
More
Search
Main Menu
Main page
Sections
Classes and Races
Spells, Songs, Disciplines, and AAs
Items
Zones
NPCs
Quests
Raids
Tradeskills
User Interface
Tips and Guides
EQ Links
Wiki
Recent changes
Advanced search
Random page
Help
Contact Fanra
Tools
What links here
Related changes
Upload file
Special pages
Page information