Template:Namespaced category: Difference between revisions
From Computing Classics Wiki
Aids auto-categorisation |
m 3 revisions imported: All kinds of templates for CCW to emulate AEW's old hard drive stock |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{#ifeq: {{NAMESPACENUMBER}}|{{{namespace|0}}}|[[Category:{{{1|Pages calling Template:Namespaced category without a category name}}}]]}}<noinclude>{{Documentation}} | {{#ifeq: {{NAMESPACENUMBER}}|{{{namespace|0}}}|[[Category:{{StripWikitext|{{{1|Pages calling Template:Namespaced category without a category name}}}}}]]}}<noinclude>{{Documentation}} | ||
<templatedata> | <templatedata> | ||
{ | { | ||
| Line 7: | Line 7: | ||
"description": "The name of the category to add if the check succeeds (do not add Category: prefix)", | "description": "The name of the category to add if the check succeeds (do not add Category: prefix)", | ||
"type": "string", | "type": "string", | ||
" | "required": true, | ||
"example": "Buses with unknown VIN" | |||
}, | }, | ||
"namespace": { | "namespace": { | ||
Latest revision as of 06:14, 24 September 2024
Template documentation (for the above template, sometimes hidden or invisible)
Checks the namespace of the page, and if it matches mainspace (or the number of the given namespace), adds a category.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Category name | 1 | The name of the category to add if the check succeeds (do not add Category: prefix)
| String | required |
| Namespace number | namespace | The namespace number to display this category in.
| Number | optional |