Template:Top icon/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Documentation subpage for Template:Top icon)
 
No edit summary
Line 31: Line 31:


{{para|width}} and {{para|height}} are restrictive, meaning when one parameter is not set explicitly, the default acts as a maximum, even if the other parameter is set higher. To increase the overall size, both must be specified.
{{para|width}} and {{para|height}} are restrictive, meaning when one parameter is not set explicitly, the default acts as a maximum, even if the other parameter is set higher. To increase the overall size, both must be specified.
For the list of topicon templates, [[:Category:Top icon templates|see this page]]. We are currently working on translation strings subpage for top icon soon.
<!--
<div style="background-color:#323232; border:1px solid #7A7A7A; border-radius:4px; padding:.5em 1.2em 1em">
=== {{Dictionary/common|Translatable strings}} ===
* '''[[Template:Topicon/strings|Topicon/strings]]''' {{Todo|Create a strings page for top icons.}}
</div>
-->


<includeonly>{{sandbox other||
<includeonly>{{sandbox other||

Revision as of 23:05, 11 January 2024

Edit-copy.png
This is a documentation subpage for Template:Top icon.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

This is a metatemplate used to help build top icons, the little (usually 24x24 pixels) icons in the top-right area of user pages or articles. The template uses the page status indicator system.

Usage

{{Top icon
| imagename    = Image file to use as icon. Use only the name of the file, not the [[File]] link.
| wikilink     = The page to link to. This is where you will be taken when clicking the icon.
| description  = The tooltip will display this text when the mouse pointer hovers over the icon.
| id           = A unique id is required when using different top icons on the same page.
}}

Extra options:

| sortkey      = Allows ordering the icons according to the sortkey given.
| width        = Uses a different width for the images. Default is 20.
| height       = Uses a different height for the images. Default is 20.
| usercat      = Adds a category to be added in userspace.
| maincat      = Adds a category to be added in article mainspace.
| subpage      = For categorization on subpages (default = no).
| nocat        = Disables the automatically added category (default = no).

Top icons are automatically sorted for consistency in articles. For that reason, |sortkey= should only be used in user top icons. Sort keys are sorted alphabetically, so, for example, "19" will sort before "2". If you want to use numbers as sort keys, and you have more than 10 top icons on a page, you must add leading zeroes, e.g. |sortkey=01, |sortkey=02, etc.

|width= and |height= are restrictive, meaning when one parameter is not set explicitly, the default acts as a maximum, even if the other parameter is set higher. To increase the overall size, both must be specified.

For the list of topicon templates, see this page. We are currently working on translation strings subpage for top icon soon.