Template:Uw template doc: Difference between revisions

ROOTPAGENAME not available on looser Wikia is available on winner Miraheze!
sims>K6ka
m (disable cats)
(ROOTPAGENAME not available on looser Wikia is available on winner Miraheze!)
 
(3 intermediate revisions by 2 users not shown)
Line 10:
If your calendar is broken, here's the current month and year: '''{{CURRENTMONTHNAME}} {{CURRENTYEAR}}'''. ([{{fullurl:{{{page|{{FULLPAGENAME}}}}}|action=purge}} Update])
 
If you're using the source editor, here's the wikitext ([{{fullurl:{{{page|{{FULLPAGENAME}}}}}|action=purge}} Update]):<br />
 
<code><nowiki>==</nowiki>{{CURRENTMONTHNAME}} {{CURRENTYEAR}}<nowiki>==</nowiki></code>
 
Then, substitute the template. You substitute a template by adding <code>subst:</code> between the initial curly brackets and the template name. For example, to substitute this template, do the following:
 
<code><nowiki>{{</nowiki>subst:{{#titleparts: {{FULLPAGENAME}} | 1 ROOTPAGENAME}}<nowiki>}}</nowiki></code>
 
If you want to reference a specific page the user edited, you can add the full page title of the the page in question to the first optional parameter. For example, to reference the page [[Foo]]:
 
<code><nowiki>{{</nowiki>subst:{{#titleparts: {{FULLPAGENAME}} | 1 ROOTPAGENAME}} {{!}} Foo <nowiki>}}</nowiki></code>
 
''Do not wikilink''; this template will do it for you.
Line 25 ⟶ 26:
If the template message isn't enough, you can also append an additional optional comment.
 
<code><nowiki>{{</nowiki>subst:{{#titleparts: {{FULLPAGENAME}} | 1 ROOTPAGENAME}} {{!}} Foo {{!}} ''Your custom message here'' <nowiki>}}</nowiki></code>
|text ={{Important note|''Do not'' insert characters used in template parameter usage, such as {{=}} (equal signs) or <nowiki>|</nowiki> (pipes). '''This includes URLs, such as the URLs of diffs.''' Doing so will break the template, and your custom message may not appear. ThisUse is[[Special:Diff]] ato technicallink limitationto of MediaWikidiffs, or replace {{=}} and unfortunately{{!}} therewith is{{tlx|{{=}}}} noand easy{{tlx|!}}, fixrespectively.}}
{{Metabox
|nocat = yes
|type = notice
|image = Icon-warning-48x48.png
|headline = Important
|text = ''Do not'' insert characters used in template parameter usage, such as {{=}} (equal signs) or <nowiki>|</nowiki> (pipes). '''This includes URLs, such as the URLs of diffs.''' Doing so will break the template, and your custom message may not appear. This is a technical limitation of MediaWiki, and unfortunately there is no easy fix.
 
If you need to link to a diff, use [[Special:Diff]] instead.}}
 
If you want to leave a custom message without linking to a page, do the following:
 
<code><nowiki>{{</nowiki>subst:{{#titleparts: {{FULLPAGENAME}} | 1 ROOTPAGENAME}} {{!}} 2 {{=}} ''Your custom message here''<nowiki>}}</nowiki></code>
 
You may now save your edit. You ''do not'' need to insert your [[Help:Signature|signature]], as this template will do it for you.
 
;Complete template code
<code><nowiki>{{</nowiki>subst:{{#titleparts: {{FULLPAGENAME}} | 1 ROOTPAGENAME}} {{!}} ''Full page title of affected page'' {{!}} 2 {{=}} ''Your custom message here''<nowiki>}}</nowiki></code>
}}
{{#if:{{{series|}}}|