Template:Top icon: Difference between revisions
Content added Content deleted
No edit summary |
(Working on a top icon template.) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{#tag:indicator|[[File:{{{image|{{{imagename|{{{1|}}}}}}}}}|{{#if:{{{width|}}}|{{{width}}}|20}}x{{#if:{{{height|}}}|{{{height}}}|20}}px |
<includeonly><nowiki /><!-- This nowiki tag helps prevent whitespace at the top of articles. -->{{#tag:indicator|[[File:{{{image|{{{imagename|{{{1|}}}}}}}}}|{{#if:{{{width|}}}|{{{width}}}|20}}x{{#if:{{{height|}}}|{{{height}}}|20}}px |
||
|{{# |
|{{#ifeq:{{{link|+}}}|{{{link|-}}}|link={{{link}}}|{{#ifeq:{{{wikilink|+}}}|{{{wikilink|-}}}|link={{{wikilink}}}|{{#ifeq:{{{2|+}}}|{{{2|-}}}|link={{{2}}}|}}}}}} |
||
|{{#if:{{{alt|}}}|alt={{{alt}}}}} |
|{{#if:{{{alt|}}}|alt={{{alt}}}}} |
||
|{{{text|{{{description|{{{3|}}}}}}}}}]] |
|{{{text|{{{description|{{{3|}}}}}}}}}]] |
||
|name = {{#if:{{{sortkey|}}}|{{{sortkey}}}-}}{{#if:{{{name|}}}|{{{name}}}|{{#if:{{{id|}}}|{{{id}}}|{{{image|{{{imagename|{{{1|}}}}}}}}}}}}}}}{{Category handler |
|||
<templatedata> |
|||
|user = {{{usercat|}}} |
|||
{ |
|||
|main = {{{maincat|}}} |
|||
"params": { |
|||
|subpage = {{{subpage|no}}} |
|||
"1": {}, |
|||
|nocat = {{{nocat|}}} |
|||
"2": {}, |
|||
}}</includeonly><noinclude> |
|||
"3": {}, |
|||
{{Documentation}} |
|||
"image": {}, |
|||
</noinclude> |
|||
"imagename": {}, |
|||
"width": {}, |
|||
"height": {}, |
|||
"link": {}, |
|||
"wikilink": {}, |
|||
"alt": {}, |
|||
"text": {}, |
|||
"description": {}, |
|||
"sortkey": {}, |
|||
"name": {}, |
|||
"id": {}, |
|||
"usercat": {}, |
|||
"maincat": {}, |
|||
"subpage": {}, |
|||
"nocat": {} |
|||
}, |
|||
"format": "{{_\n| _ = _\n}}" |
|||
} |
|||
</templatedata> |
Latest revision as of 23:14, 7 July 2020
Usage[edit]
{{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. }}
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).