Template:Uw template doc: Difference between revisions

ROOTPAGENAME not available on looser Wikia is available on winner Miraheze!
m (4 revisions imported: Import from https://sims.wikia.com)
(ROOTPAGENAME not available on looser Wikia is available on winner Miraheze!)
 
Line 16:
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 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>
{{Important note|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. Use [[Special:Diff]] to link to diffs, or replace {{=}} and {{!}} with {{tlx|{{=}}}} and {{tlx|!}}, respectively.}}
{{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. Use [[Special:Diff]] to link to diffs, or replace {{=}} and {{!}} with {{tlx|{{=}}}} and {{tlx|!}}, respectively.}}
 
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|}}}|