Template:PageLookup: Difference between revisions
From LOTR-TCG Wiki
No edit summary |
(Adding sensible defaults for the page lookup so that it doesn't silently produce a non-linked card) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
{{#template_params:1}} | {{#template_params:1}} | ||
</noinclude><includeonly>{{#if: {{#pos:{{{1}}}|-}}|{{#cargo_query:tables=Cards=C,CardReleases=CR|join on= C.ID = CR.BaseCardID|fields=REPLACE(REPLACE(C._pageName, '/Data', ''), 'Data:', '')|where=CR.ID='{{{1}}}'|no html|default={{{1}}}}}|{{#cargo_query:tables=Cards|fields=REPLACE(REPLACE(_pageName, '/Data', ''), 'Data:', '')|where=Cards.CollInfo='{{{1}}}'|no html|default={{{1}}} | </noinclude><includeonly>{{#if: {{#pos:{{{1}}}|-}}|{{#cargo_query:tables=Cards=C,CardReleases=CR|join on= C.ID = CR.BaseCardID|fields=REPLACE(REPLACE(C._pageName, '/Data', ''), 'Data:', '')|where=CR.ID='{{{1}}}'|no html|default={{LinkNameWithImage|PageTitle={{{1}}}|Title={{{1}}}}}}}|{{#cargo_query:tables=Cards|fields=REPLACE(REPLACE(_pageName, '/Data', ''), 'Data:', '')|where=Cards.CollInfo='{{{1}}}'|no html|default={{LinkNameWithImage|PageTitle={{{1}}}|Title={{{1}}}}}}}}}</includeonly><noinclude> | ||
<templatedata> | <templatedata> | ||
{ | { |
Latest revision as of 21:25, 26 September 2023
This is the "PageLookup" template.
It should be called in the following format:
{{PageLookup |1= }}
Edit the page to see the template text.
Performs a lookup into the cargo Cards database. If a card WikiID is passed (such as '''LOTR-TW01S013.0'''), it will be ignored, but otherwise it will be treated as a collector's info to be looked up instead.
Parameter | Description | Type | Status | |
---|---|---|---|---|
1 | 1 | Collector's info to look up (ignored if it's a wiki ID instead)
| Unknown | optional |