Template:Favilink: Difference between revisions

Jump to navigation Jump to search
mNo edit summary
(now with fancy css!)
Line 1: Line 1:
<includeonly>{{#cargo_query:table=GeneralData|fields=CONCAT('[[File:',Image,'|16px]]')|where=_pageNamespace='0'AND _pageName='{{{1|}}}'|format=list}}[[{{{1|}}}|{{{2|{{{1|}}}}}}]]</includeonly><noinclude>
<includeonly><span class="qud-image">
<span class="qud-image-link">
<span class="qud-image-link-image-container">
{{#cargo_query:table=GeneralData|fields=CONCAT('[[File:',Image,'|16x24px|top]]')|where=_pageNamespace='0'AND _pageName='{{{1|}}}'|format=list}}
</span>
<span class="plainlinks">[{{canonicalurl:{{{1|}}}}} {{#if: {{{2|}}}|{{Qud text|&y{{{2}}}|notxml}}|{{#cargo_query:table=GeneralData|fields=DisplayName|where=_pageNamespace='0' AND _pageName='{{{1|}}}'}}}}]</span>
</span>
</span></includeonly><noinclude>
[[Category:Templates]]
[[Category:Templates]]
!!Currently only for use for objects in the tables: ItemsTable, Food, Corpses, Characters.
!!Currently only for use for objects in the tables: ItemsTable, Food, Corpses, Characters.
Line 5: Line 12:
Used similar to regular wikipage linking syntax. First argument takes name of the page and will pull the image from that item.
Used similar to regular wikipage linking syntax. First argument takes name of the page and will pull the image from that item.
<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
{{favilink|torch}}
{{favilink|stopsvalinn}}
</syntaxhighlight>
</syntaxhighlight>
{{favilink|torch}}
{{favilink|stopsvalinn}}


You can also use a second argument to reword the link:
You can also use a second argument to reword the link:


<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
{{favilink|torch|A really spicy meatball}}
{{favilink|torch|A &Rreally&y spicy meatball}}
</syntaxhighlight>
</syntaxhighlight>


{{favilink|torch|A really spicy meatball}}
{{favilink|torch|A &Rreally&y spicy meatball}}
</noinclude>
</noinclude>