Difference between revisions of "Template:Disambigentry/sandbox"

From Team Fortress Wiki
Jump to: navigation, search
(Test, probably keeping this page until I've fully moved changed every disambig needed)
 
(Testing auto translate)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[File:{{{icon-override|Item icon {{{1}}}.png}}}|link={{{link|{{{1}}}}}}{{if lang}}|{{{size|64px}}}]] {{#if:{{{icon-override|}}}|[[{{{link|{{{1}}}}}}{{if lang}}|{{{l1|{{{1}}}}}}]]|{{item link|{{{1}}}}}}}<noinclude>
+
<noinclude>{{Complex template|user=GrampaSwood}}</noinclude>[[File:{{{icon-override|Item icon {{{1}}}.png}}}|link={{{link|{{{1}}}{{if lang}}}}}|{{{size|64px}}}]] {{#if:{{{link|}}}|[[{{{link}}}|{{{l1|{{{1}}}}}}]]|{{#if:{{{icon-override|}}}|[[{{{link|{{{1}}}}}}{{if lang}}|{{{l1|{{{1}}}}}}]]|{{item link|{{{1}}}}}}}}}<noinclude>
 
{{doc begin}}
 
{{doc begin}}
 
== Usage ==
 
== Usage ==
:<code><nowiki>{{Disambigentry|1|icon-override=<image name>.jpg/png|size=<number>px|link=<page name>}}</nowiki></code>
+
:<code><nowiki>{{Disambigentry|1|icon-override=<image name>.jpg/png|size=<number>px|link=<article link>}}</nowiki></code>
 
{{Note|<code><nowiki>{{de}}</nowiki></code> also works!}}
 
{{Note|<code><nowiki>{{de}}</nowiki></code> also works!}}
 
For usage on disambiguations, automatically adds link + item icon.
 
For usage on disambiguations, automatically adds link + item icon.
Line 8: Line 8:
 
== Parameters ==
 
== Parameters ==
 
; 1
 
; 1
: Uses {{tl|item link}}, anything that can be used with that can be used with this. If argument "icon-override" is used, removes {{tl|item link}} usage and requires "l1" argument to display translated names.
+
: Name of the item, if "link" or "icon-override" parameter is not used it defaults to using {{tl|item link}}. Also used for the displayed text, the item icon filename, the icon's link, and the default displayed text when using the "link" parameter.
  
 
:;l1
 
:;l1
: Used to override the display text for the text link.
+
: Optional, used to override the displayed text for the text link.
  
 
; icon-override
 
; icon-override
: Optional, used to override the default item icon (for usage on non-items). If used, removes the usage of {{tl|item link}}.
+
: Optional, used to override the default item icon (for usage on non-items).
  
 
; size
 
; size
Line 20: Line 20:
  
 
; link
 
; link
: Optional, used to add a link to the image (for usage on non-items). Automatically links to non-English pages.
+
: Optional, used when the linked item is not compatible with {{tl|item link}}. Additionally, determines link on the icon and the link next to it.
  
 
== Example ==
 
== Example ==

Latest revision as of 21:06, 30 March 2024

[[File:Item icon {{{1}}}.png|link={{{1}}}|64px]] [[{{{1}}}|{{dictionary/items/{{{1}}}|null=|list=}}]]

Documentation for Disambigentry/sandbox

Usage

{{Disambigentry|1|icon-override=<image name>.jpg/png|size=<number>px|link=<article link>}}

Pictogram comment.png {{de}} also works!
For usage on disambiguations, automatically adds link + item icon.

Parameters

1
Name of the item, if "link" or "icon-override" parameter is not used it defaults to using {{item link}}. Also used for the displayed text, the item icon filename, the icon's link, and the default displayed text when using the "link" parameter.
l1
Optional, used to override the displayed text for the text link.
icon-override
Optional, used to override the default item icon (for usage on non-items).
size
Optional, same as size argument from {{item icon}}, defaults to 64px.
link
Optional, used when the linked item is not compatible with {{item link}}. Additionally, determines link on the icon and the link next to it.

Example

{{Disambigentry|Bat}} generates Item icon Bat.png Bat.

{{Disambigentry|icon-override=Standard icon RED Bat.png|link=Bat/nl|size=70px}} generates Standard icon RED Bat.png Bat