GaryJJSpate (talk | contribs) No edit summary |
GaryJJSpate (talk | contribs) No edit summary |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly><div class="vault-infobox vault-infobox-category"><div class="vault-infobox-header">{{PAGENAME}}</div>{{#if:{{{parent_categories|}}}|<div class="vault-infobox-row"><span class="vault-infobox-k">PARENT CATEGORY</span><span class="vault-infobox-v">{{{parent_categories}}}</span></div>}}{{#if:{{{related_categories|}}}|<div class="vault-infobox-row"><span class="vault-infobox-k">RELATED CATEGORIES</span><span class="vault-infobox-v">{{{related_categories}}}</span></div>}}</div></includeonly><noinclude> | |||
== Template:InfoboxCategory == | |||
Renders the infobox card at the top of a Vault '''category''' page — as distinct from the content infoboxes ({{tl|InfoboxMovie}}, {{tl|InfoboxShow}}, etc.), which describe an article's subject rather than a category's place in the tree. | |||
Displays the page's own name automatically via <code>{{PAGENAME}}</code> — there is no <code>name</code> parameter, since a category page's title is fixed and shouldn't need repeating. | |||
'''Note:''' requires the ParserFunctions extension for the <code>{{#if:}}</code> conditionals, same as the other infoboxes. | |||
'''Formatting note:''' the entire template body is written as one unbroken line, with no line breaks between rows — same rule as every other infobox/brief template on the wiki. Splitting rows across multiple lines causes MediaWiki to wrap them in stray <code><p></code> tags; leaving blank lines between otherwise-correct rows causes visible gaps. | |||
'''Important:''' this template must never be placed on a page that also contains a call to itself, and must never itself call <code>{{InfoboxCategory}}</code> — doing either produces a "Template loop detected" error. | |||
'''Usage:''' | |||
<pre> | |||
{{InfoboxCategory | {{InfoboxCategory | ||
|parent_categories=[[:Category: | |parent_categories=[[:Category:The Vault|The Vault]] | ||
|related_categories=[[:Category:Locations by Type|Locations by Type]], [[:Category:Locations by Geography|Locations by Geography]] | |related_categories=[[:Category:Locations by Type|Locations by Type]], [[:Category:Locations by Geography|Locations by Geography]] | ||
}} | }} | ||
</pre> | |||
Place at the top of a category page, before its descriptive text. | |||
* '''[[ | === Parameters === | ||
* ''' | * '''parent_categories''' — the category's parent(s) in the tree, as display text/links (this is separate from the actual <nowiki>[[Category:Parent]]</nowiki> tag at the bottom of the page, which is what does the real categorization — this parameter is just the human-readable label) | ||
* '''related_categories''' — optional. Sibling or cross-referenced categories worth surfacing to a reader browsing this category | |||
[[Category: | [[Category:Infoboxes]] | ||
</noinclude> | |||
Latest revision as of 20:37, 3 August 2026
Template:InfoboxCategory
Renders the infobox card at the top of a Vault category page — as distinct from the content infoboxes ({{InfoboxMovie}}, {{InfoboxShow}}, etc.), which describe an article's subject rather than a category's place in the tree.
Displays the page's own name automatically via InfoboxCategory — there is no name parameter, since a category page's title is fixed and shouldn't need repeating.
Note: requires the ParserFunctions extension for the conditionals, same as the other infoboxes.
Formatting note: the entire template body is written as one unbroken line, with no line breaks between rows — same rule as every other infobox/brief template on the wiki. Splitting rows across multiple lines causes MediaWiki to wrap them in stray <p> tags; leaving blank lines between otherwise-correct rows causes visible gaps.
Important: this template must never be placed on a page that also contains a call to itself, and must never itself call
InfoboxCategory— doing either produces a "Template loop detected" error.
Usage:
{{InfoboxCategory
|parent_categories=[[:Category:The Vault|The Vault]]
|related_categories=[[:Category:Locations by Type|Locations by Type]], [[:Category:Locations by Geography|Locations by Geography]]
}}
Place at the top of a category page, before its descriptive text.
Parameters
- parent_categories — the category's parent(s) in the tree, as display text/links (this is separate from the actual [[Category:Parent]] tag at the bottom of the page, which is what does the real categorization — this parameter is just the human-readable label)
- related_categories — optional. Sibling or cross-referenced categories worth surfacing to a reader browsing this category
