Changes

Jump to navigation Jump to search

Template:Sandbox other/doc

2,145 bytes added, 16 March
Created page with "This template allows to differentiate between regular <code>Template:...</code> and <code>Template:.../sandbox</code> pages. It is typically used to ''prevent'' a /sandbox pag..."
This template allows to differentiate between regular <code>Template:...</code> and <code>Template:.../sandbox</code> pages. It is typically used to ''prevent'' a /sandbox page being categorised with their main page.

;Also: when numbered /sandbox1
Any subpage <code>/sandbox''ANYTEXT''</code> is considered a <code>/sandbox</code>. So this includes <code>/sandbox''1''</code>, <code>/sandbox_2</code>.

;Also: /doc
A <code>/doc</code> subpage is also considered a <code>/sandbox</code>.

== Usage ==
This template can be used on template documentation pages to ensure that any given template sandbox or template documentation does not populate its main template's category(ies).

This template has two unnamed parameters, <code><nowiki>|1=</nowiki></code> and <code><nowiki>|2=</nowiki></code>. Near the bottom of a /doc page where the categories are usually placed, install this template as follows:
<pre>
{{Documentation subpage}}
<!-- all /documentation code goes here -->
{{wikipedia|Sandbox other/doc}}
<includeonly>{{Sandbox other||
<!-- Categories the main template should be in, but not the /sandbox: -->
[[Category:(first category)]]
[[Category:(second category)]]

}}</includeonly>
</pre>

* Usage of an empty first parameter (two pipes together, <code><nowiki>||</nowiki></code>, at the end of the first line of code above) essentially means <code><nowiki>|1=(do nothing)</nowiki></code>, and will not allow the sandbox page to populate the listed categories.
* Note that the closing template braces <code><nowiki>}}</nowiki></code>) are placed just before the &#60;/includeonly> tag. This is the same as <code><nowiki>|2=(category comment and categories)</nowiki></code>. In "long hand" it may appear as follows:
<pre>
<includeonly>{{Sandbox other|1=<!-- keep sandbox out of categories -->|2=
<!-- Please, categories go below this line and interwikis go to Wikidata -->
[[Category:(first category)]]
[[Category:(second category)]]
(more categories if needed)

}}</includeonly>
</pre>
<includeonly>[[Category:General wiki templates|{{PAGENAME}}]]</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
Anonymous user

Navigation menu