Template:Content/Icon/doc: Difference between revisions

From Vintage Story Wiki
(Created page with ";Description :This template is used only for editing Template:Navbox, to simplify the lists of icons with links. Has been updated as of July 10, 2022 to use Template:Pag...")
 
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
;Description
;Description
:This template is used only for editing [[Template:Navbox]], to simplify the lists of icons with links. Has been updated as of July 10, 2022 to use [[Template:Page language link]] to ensure proper interlanguage linking.
:This template is used only for editing [[Template:Navbox]], to simplify the lists of icons with links.
;Syntax
;Syntax
:Use within a table row. The template takes two parameters: <code><nowiki>{{Navbox/Icon|Filename|Target page|Link text}}</nowiki></code>
:Use within a table row. The template takes two parameters: <code><nowiki>{{Content/Icon|Filename|Target page|Link text}}</nowiki></code>
::'''Filename''', required: The file name for the icon, which will always display at 25px.
::'''Filename''', required: The file name for the icon, which will always display at 25px.
::'''Target page''', required: The page to which both the icon and the link text will go to when clicked.
::'''Target page''', required: The page to which both the icon and the link text will go to when clicked.
::Link text, optional: The text that displays for the link text. Defaults to whatever is written as the target page.
::Link text, optional: The text that displays for the link text. Defaults to whatever is written as the target page.
;Sample output
;Sample output
:<code><nowiki>{{Navbox/Icon|Rawclay blue.png|Clay}}</nowiki></code> gives...
:<code><nowiki>{{Content/Icon|Rawclay blue.png|Clay}}</nowiki></code> gives...
:{{Navbox/Icon|Rawclay blue.png|Clay}}
:{{Content/Icon|Rawclay blue.png|Clay}}
:<code><nowiki>{{Navbox/Icon|Rawclay blue.png|Clay|Custom name}}</nowiki></code> gives...
:<code><nowiki>{{Content/Icon|Rawclay blue.png|Clay|Custom name}}</nowiki></code> gives...
:{{Navbox/Icon|Rawclay blue.png|Clay|Custom name}}
:{{Content/Icon|Rawclay blue.png|Clay|Custom name}}


<noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
<noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>

Latest revision as of 05:54, 5 August 2023

Description
This template is used only for editing Template:Navbox, to simplify the lists of icons with links.
Syntax
Use within a table row. The template takes two parameters: {{Content/Icon|Filename|Target page|Link text}}
Filename, required: The file name for the icon, which will always display at 25px.
Target page, required: The page to which both the icon and the link text will go to when clicked.
Link text, optional: The text that displays for the link text. Defaults to whatever is written as the target page.
Sample output
{{Content/Icon|Rawclay blue.png|Clay}} gives...
Rawclay blue.pngClay
{{Content/Icon|Rawclay blue.png|Clay|Custom name}} gives...
Rawclay blue.pngCustom name