Template:Templatecategory: Difference between revisions

From SmashWiki, the Super Smash Bros. wiki
Jump to navigationJump to search
m (1 revision: pages)
m (Text replacement - "\[\[Category:([^|]+)\|{{PAGENAME}}\]\]" to "Category:$1")
 
(2 intermediate revisions by 2 users not shown)
Line 2: Line 2:
''This template is used in subcategories of [[:Category:Templates]]''
''This template is used in subcategories of [[:Category:Templates]]''


[[Category:Category templates|{{PAGENAME}}]]
[[Category:Category templates]]</noinclude>
</noinclude>
----
----


Line 9: Line 8:


<div style="margin: 1em 0ex;">
<div style="margin: 1em 0ex;">
* Use <code>&lt;noinclude&gt;&#x5b;&#x5b;Category:{{PAGENAME}}&#x7c;&#x7b;&#x7b;PAGENAME&#x7d;&#x7d;&#x5d;&#x5d;&lt;/noinclude&gt;</code>. The "&lt;noinclude&gt;" tags are necessary because without them, you end up categorizing all pages using the template in the template category! Please also note the <tt style="border-bottom: 1px dotted; cursor: help;" title="Makes it sort on the actual template name rather than 'T' as in 'Template:'."><nowiki>|{{PAGENAME}}</nowiki></tt>.
* Use <code>&lt;noinclude&gt;&#x5b;&#x5b;Category:{{PAGENAME}}&#x5d;&#x5d;&lt;/noinclude&gt;</code>. The "&lt;noinclude&gt;" tags are necessary because without them, you end up categorizing all pages using the template in the template category!
 
</div><div style="margin: 1em 0ex;">
</div><div style="margin: 1em 0ex;">
* If your template is meant to be '''used in-line''', make sure that there are '''no line feeds''' after <tt>&lt;/noinclude&gt;</tt>. If there are, it may work in flowing text, but it will misbehave in bullet lists. You can have as many line feeds as you like ''between'' the noinclude tags though:
* If your template is meant to be '''used in-line''', make sure that there are '''no line feeds''' after <tt>&lt;/noinclude&gt;</tt>. If there are, it may work in flowing text, but it will misbehave in bullet lists. You can have as many line feeds as you like ''between'' the noinclude tags though:
  &lt;noinclude&gt;&#x5b;&#x5b;Category:{{PAGENAME}}&#x7c;&#x7b;&#x7b;PAGENAME&#x7d;&#x7d;&#x5d;&#x5d;<br>
  &lt;noinclude&gt;&#x5b;&#x5b;Category:{{PAGENAME}}&#x5d;&#x5d;<br>
  &lt;/noinclude&gt;''Text or graphic that is meant to be used in-line
  &lt;/noinclude&gt;''Text or graphic that is meant to be used in-line
</div>
</div>
* Remember that a template can be put in multiple categories if it belongs to them all!
* Remember that a template can be put in multiple categories if it belongs to them all!
* Or, if this is not quite the right category, go back to [[:Category:Templates]] and try to find a better suited subcategory.
* Or, if this is not quite the right category, go back to [[:Category:Templates]] and try to find a better suited subcategory.

Latest revision as of 04:40, February 10, 2021

This template is used in subcategories of Category:Templates


To put a template in Category:Templatecategory:

  • Use <noinclude>[[Category:Templatecategory]]</noinclude>. The "<noinclude>" tags are necessary because without them, you end up categorizing all pages using the template in the template category!
  • If your template is meant to be used in-line, make sure that there are no line feeds after </noinclude>. If there are, it may work in flowing text, but it will misbehave in bullet lists. You can have as many line feeds as you like between the noinclude tags though:
<noinclude>[[Category:Templatecategory]]
</noinclude>Text or graphic that is meant to be used in-line
  • Remember that a template can be put in multiple categories if it belongs to them all!
  • Or, if this is not quite the right category, go back to Category:Templates and try to find a better suited subcategory.