Template:Favilink id: Difference between revisions

1,163 bytes removed ,  20:33, 12 September 2019
replaced with module
(fixed bugs with stored data that had plain name != page name)
(replaced with module)
Line 1: Line 1:
<includeonly><span class="qud-image"><span class="qud-image-link-image-container">{{#vardefine:pagelink|{{#cargo_query:table=GeneralData|fields=_pageName|where=_pageNamespace='0' AND ObjectID='{{#replace:{{{1|}}}|'|''}}'|limit=1|more results text=|default={{{1|}}}|format=template|template=single query result|nohtml }} }}{{#ifexist: {{#cargo_query:table=GeneralData|fields=CONCAT('File:',Image)|where=_pageNamespace='0' AND ObjectID='{{#replace:{{{1|}}}|'|''}}'|format=template|template=single query result|limit=1|more results text=}} | [[File:{{#cargo_query:table=GeneralData|fields=Image|where=_pageNamespace='0' AND ObjectID='{{#replace:{{{1|}}}|'|''}}'|format=template|template=single query result|limit=1|more results text=|default=}}|16px|link={{{1|}}}]] | {{#cargo_query:table=GeneralData|fields=DisplayChar|where=_pageNamespace='0' AND ObjectID='{{#replace:{{{1|}}}|'|''}}'|format=template|template=single query result|limit=1|more results text=|default=}} }}</span><span class="qud-image-link" style="color:#b1c9c3;">[[{{#var:pagelink}}|{{#if: {{{2|}}}|{{Qud text|&y{{{2}}}|notxml}}|{{#cargo_query:table=GeneralData|fields=DisplayName|where=_pageNamespace='0' AND ObjectID='{{#replace:{{{1|}}}|'|''}}'|limit=1|more results text=|default={{{1}}}}}}}]]</span></span></includeonly><noinclude>
<includeonly>{{#invoke:Favilink| idfavilink |{{#if:{{{Page|}}}|{{#titleparts:{{{Page}}}}}|{{{1|}}} }}|{{{2|}}}}}</includeonly><noinclude>
[[Category:Shorthand Templates]]
[[Category:Shorthand Templates]]
!!Currently only for use for objects in the tables: ItemsTable, Food, Corpses, Characters. All possible items can be found here: [[Special:CargoTables/GeneralData]]. This is [[Template:Favilink]], but searches by ObjectID instead of page name.
!!Currently only for use for objects in the tables: ItemsTable, Food, Corpses, Characters. All possible items can be found here: [[Special:CargoTables/GeneralData]]. This is [[Template:Favilink]], but searches by ObjectID instead of page name.