Template:Favilink: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
(Created page with "<includeonly>{{#cargo_query:table=ItemsTable|fields=CONCAT('16px')|where=_pageNamespace='0'AND _pageName='{{{1|}}}'|format=list}}{{{1|}}}|{{{2|{{{1|}}}}}}...")
 
(upgraded to be more powerful)
Line 1: Line 1:
<includeonly>{{#cargo_query:table=ItemsTable|fields=CONCAT('[[File:',Image,'|16px]]')|where=_pageNamespace='0'AND _pageName='{{{1|}}}'|format=list}}[[{{{1|}}}|{{{2|{{{1|}}}}}}]]</includeonly><noinclude>
<includeonly{{#cargo_query:table=GeneralData|fields=CONCAT('[[File:',Image,'|16px]]')|where=_pageNamespace='0'AND _pageName='{{{1|}}}'|format=list}}[[{{{1|}}}|{{{2|{{{1|}}}}}}]]</includeonly><noinclude>
[[Category:Templates]]
[[Category:Templates]]
!!Currently only for use for objects in the ItemsTable!!
!!Currently only for use for objects in the tables: ItemsTable, Food, Corpses, Characters.
==Usage==
==Usage==
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.

Revision as of 20:32, 6 August 2019

<includeonlyNo results[[|]]</includeonly> !!Currently only for use for objects in the tables: ItemsTable, Food, Corpses, Characters.

Usage

Used similar to regular wikipage linking syntax. First argument takes name of the page and will pull the image from that item.

{{favilink|torch}}

<includeonlyTorch.pngtorch

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

{{favilink|torch|A really spicy meatball}}

<includeonlyTorch.pngA really spicy meatball