Template:Content/Icon: Difference between revisions

From Vintage Story Wiki
(Added optional custom name)
(Updating this to use {{pll}} for localization purposes)
Line 1: Line 1:
<includeonly>[[File:{{{1}}}|25px|link={{{2}}}]][[{{{2}}}|{{{3|{{{2}}}}}}]]</includeonly><noinclude>
<includeonly>[[File:{{{1}}}|25px|link={{{2}}}]]{{pll|{{{2}}}|{{{3|{{{2}}}}}} }}</includeonly><noinclude>
Used to make [[Template:Navbox]] bearable to edit. <code><nowiki>{{Navbox/Icon|Rawclay blue.png|Clay|Custom name}}</nowiki></code> turns to <code><nowiki>[[File:Rawclay blue.png|25px|link=Clay]][[Clay|Custom name]]</nowiki></code>, ie, {{Navbox/Icon|Rawclay blue.png|Clay|Custom name}}. Custom name is optional <code><nowiki>{{Navbox/Icon|Rawclay blue.png|Clay}}</nowiki></code> {{Navbox/Icon|Rawclay blue.png|Clay}}
{{doc}}
</noinclude>
</noinclude>

Revision as of 19:12, 10 July 2022


[view | edit | history | purge this page]Documentation
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
[view | edit | history | purge this page]The above documentation is transcluded from Template:Content/Icon/doc.