Difference between revisions of "Template:Cat tag"

From The Coppermind
Jump to navigation Jump to search
m (add span to tag)
m (+docs)
Line 10: Line 10:
This template automatically adds a link to a category, and the category itself to a page.
This template automatically adds a link to a category, and the category itself to a page.


=== Template ===
{{docs/missing}}
<small>'''Note:''' Replace <code><nowiki>{{1}}</nowiki></code> & optionally <code><nowiki>{{2}}</nowiki></code> with an actual parameter.</small>
<pre class=mw-code>
{{cat tag| {{1}} | {{2}} }}
</pre>


=== Parameters ===
Highlighted lines indicate '''mandatory''' parameters.

Positional parameters are indicated with <nowiki>{{N}}</nowiki> in their name. For example, <nowiki>{{1}}</nowiki> means "the first template parameter".

{{docs|title={{t|cat tag}} Parameters}}

<!-- ------------- -->
<!-- ROW: {{1}} -->
<!-- ------------- -->
{{docs/row/required
|param=<nowiki>{{1}}</nowiki>
|desc= Use the first parameter to add the page to a category and link to that category.
|eg=
<code><nowiki>|Diagram</nowiki></code>
}}

<!-- -------- -->
<!-- ROW: {{2}}-->
<!-- -------- -->
{{docs/row/optional
|param={{2}}
|desc=Use this to change the link text to something other than the category name
|eg=
<code><nowiki>|...</nowiki></code>
}}

|}
== Articles using Template ==
== Articles using Template ==
{{for|Special:WhatLinksHere/{{FULLPAGENAME}}|a full listing|here|pre=This list is limited to 100 pages.}}
{{for|Special:WhatLinksHere/{{FULLPAGENAME}}|a full listing|here|pre=This list is limited to 100 pages.}}

Revision as of 13:23, 7 May 2020

[[:category: {{{1}}}|{{{1}}}]][[category:{{{1}}}]]

This template automatically adds a link to a category, and the category itself to a page.

Template

Note: Replace {{1}} & optionally {{2}} with an actual parameter.

{{cat tag| {{1}} | {{2}} }}

Parameters

Highlighted lines indicate mandatory parameters.

Positional parameters are indicated with {{N}} in their name. For example, {{1}} means "the first template parameter".

{{cat tag}} Parameters
Parameter Description Examples
{{1}} Use the first parameter to add the page to a category and link to that category.

|Diagram

Template:2 Use this to change the link text to something other than the category name

|...

Articles using Template