Editing
Template:Top icon/doc
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Documentation subpage}} {{High-use}} {{caution|Do not use images with licenses requiring attribution in a top icon if you are going to link to somewhere other than the image description page. Not linking to the image is likely to violate the license.}} {{Template display|nomobile}} This is a metatemplate used to help build top icons, the little (usually 20x20 pixels) icons in the top-right area of a page. The template uses the [[mw:Help:Page status indicators|page status indicator]] system. ==Usage== <syntaxhighlight lang="wikitext" style="overflow: auto;"> {{Top icon | imagename = Image file to use as icon. | 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. }}</syntaxhighlight> Extra options: <syntaxhighlight lang="wikitext" style="overflow: auto;"> | 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). | skin-invert = Sets the `skin-invert` CSS class (which inverts the value of colors when viewed in dark mode) on the image. Intended for default-black icons or others that require this for dark mode visibility. </syntaxhighlight> Top icons are automatically sorted for consistency in articles. For that reason, {{para|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. {{para|sortkey|01}}, {{para|sortkey|02}}, etc. {{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. The following parameters are obsolete and no longer functional: {{para|{{red|number}}}}, {{para|{{red|icon_nr}}}}, {{para|{{red|offset}}}}, {{para|{{red|extra-offset}}}}, {{para|{{red|class}}}} and {{para|{{red|style}}}}. ===Example=== <syntaxhighlight lang="wikitext"> {{Accountcreator topicon}} {{Rollback topicon}} {{Autopatrolled topicon}} </syntaxhighlight> ===Example with blank space=== <syntaxhighlight lang="wikitext"> {{Admin topicon|sortkey=1}} {{Top icon|imagename=Blank 50px.png|sortkey=2}} {{Oversighter topicon|sortkey=3}} {{Checkuser topicon|sortkey=4}} </syntaxhighlight> ==Tracking category== * {{clc|Pages using Top icon with unknown parameters}} ** The following parameters are obsolete, "unknown", and no longer functional: {{para|{{red|number}}}}, {{para|{{red|icon_nr}}}}, {{para|{{red|offset}}}}, {{para|{{red|extra-offset}}}}, {{para|{{red|class}}}} and {{para|{{red|style}}}}. ==See also== * [[mw:Help:Page status indicators]] {{top icon templates}} == Template data == <templatedata> { "description": "The topicon meta-template", "params": { "imagename": { "label": "Image name", "description": "Image file to use as icon", "aliases": [ "image", "1" ], "required": true, "example": "Crystal 128 penguin.png", "type": "wiki-file-name" }, "wikilink": { "label": "Link", "description": "The page to link to. This is where you will be taken when clicking the icon. Do not use images with licenses requiring attribution in a top icon if you are going to link to somewhere other than the image description page, as that is likely to violate the license", "aliases": [ "link", "2" ], "suggested": true, "example": "User:Anomie/Penguin Cabal", "type": "wiki-page-name" }, "description": { "label": "Description", "description": "Text displayed in a tooltip when hovering over the icon", "aliases": [ "text", "3" ], "suggested": true, "example": "This user is in the Penguin Cabal", "type": "string" }, "id": { "label": "Id", "description": "A unique id, required when using different top icons on the same page", "aliases": [ "name" ], "example": "penguin-cabal-topicon", "type": "string" }, "alt": { "label": "Alternative text", "description": "The alternative text for the image", "type": "string" }, "sortkey": { "label": "Sort key", "description": "Allows ordering the icons according to the sort key given", "example": "2", "type": "string" }, "width": { "label": "Width", "description": "Sets a different width for the images", "default": "20", "type": "number" }, "height": { "label": "Height", "description": "Sets a different height for the images", "default": "20", "type": "number" }, "usercat": { "label": "Category in userspace", "description": "Adds a category to be included in userspace", "type": "wiki-page-name", "example": "[[Category:Penguins]]" }, "maincat": { "label": "Category in the article mainspace", "description": "Adds a category to be included in the article mainspace", "type": "wiki-page-name", "example": "[[Category:Penguins]]" }, "subpage": { "label": "Subpage category", "description": "For categorization on subpages", "default": "no", "type": "string" }, "nocat": { "label": "Disable all categories", "description": "Disables the automatically added category", "default": "no", "type": "string" }, "skin-invert": { "label": "Invert brightness in dark mode", "description": "Inverts the icon's brightness when using dark mode", "example": "yes", "type": "string" } } } </templatedata> <includeonly>{{Sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:Title templates]] [[Category:Top icon templates]] [[Category:User top icon templates| ]] }}</includeonly>
Summary:
By saving changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Category link with count
(
edit
)
Template:Caution
(
edit
)
Template:Clc
(
edit
)
Template:Documentation subpage
(
edit
)
Template:High-use
(
edit
)
Template:Hlist/styles.css
(
edit
)
Template:Mbox
(
edit
)
Template:Navbox
(
edit
)
Template:Para
(
edit
)
Template:Red
(
edit
)
Template:Strong
(
edit
)
Template:T1
(
edit
)
Template:Template display
(
edit
)
Template:Template link
(
edit
)
Template:Template link universal
(
edit
)
Template:Terminate sentence
(
edit
)
Template:Tl
(
edit
)
Template:Tlu
(
edit
)
Template:Top icon templates
(
edit
)
Module:Arguments
(
view source
) (protected)
Module:High-use
(
edit
)
Module:Message box
(
edit
)
Module:Message box/configuration
(
edit
)
Module:Message box/ombox.css
(
edit
)
Module:Navbar
(
edit
)
Module:Navbar/configuration
(
edit
)
Module:Navbar/styles.css
(
edit
)
Module:Navbox
(
edit
)
Module:Navbox/configuration
(
edit
)
Module:Navbox/styles.css
(
edit
)
Module:String
(
edit
)
Module:TableTools
(
edit
)
Module:Text
(
edit
)
Module:Text/data
(
edit
)
Module:Transclusion count
(
edit
)
Module:Transclusion count/data/T
(
edit
)
Module:Yesno
(
view source
) (protected)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Template
Discussion
English
Views
Read
Edit source
View history
More
Search
Navigation
Main page
Community portal
Current events
Recent changes
Random page
Help
Donate
Tools
What links here
Related changes
Upload file
Special pages
Page information