Template:Favilink id: Difference between revisions

234 bytes added ,  19:23, 17 August 2019
fixed bugs with stored data that had plain name != page name
(Created page with "<includeonly><span class="qud-image"><span class="qud-image-link-image-container">{{#ifexist: {{#cargo_query:table=GeneralData|fields=CONCAT('File:',Image)|where=_pageNamespac...")
 
(fixed bugs with stored data that had plain name != page name)
Line 1: Line 1:
<includeonly><span class="qud-image"><span class="qud-image-link-image-container">{{#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;">[[{{ID to name|{{{1|}}}}}|{{#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><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>
[[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.