Using sortkeys[edit | edit source]

This section applies to adding an infobox to the category; nothing special needs to be done when adding an infobox to an article.

To add an infobox to the category, make sure to use a Sort key. For example, when adding Template:Infobox President, one would use the following code:

{| class="infobox"
|...table code...
|}<noinclude>
[[Category:Infobox templates|President]]
</noinclude>

Piping the category with the word "President" ensures the template is inserted into the category under "P".

A <noinclude> tag is required to ensure only the template appears in the category (as opposed to every article the infobox is part of appearing in the category).
Please include the first noinclude tag on the same line as the end of the table. For example
|}<noinclude>
Not doing this may break the formatting on articles using the template.

Sample code[edit | edit source]

For a sample infobox, see either Template:Infobox or Template:Infobox Conditionals.

Note that many templates can appear in more than one category.
Smallwikipedialogo.png This page uses content from Wikipedia. The original article was at Category:Infobox templates. The list of authors can be seen in the page history. As with Governance Wiki, the text of Wikipedia is available under the GNU Free Documentation License.


All items (3)

Community content is available under CC-BY-SA unless otherwise noted.