Template:IDLookup: Difference between revisions
From LOTR-TCG Wiki
No edit summary |
No edit summary Tag: Manual revert |
||
| (9 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
{{#template_params:1|2}} | {{#template_params:1|2}} | ||
</noinclude><includeonly>{{#if: {{#pos:{{{1}}}|-}}|{{#cargo_query:tables=Cards=C,CardReleases=CR|join on= C.ID = CR.BaseCardID|fields=C.ID|where=CR.ID='{{{1}}}'|limit=1|no html}}|{{#cargo_query:tables=Cards=C,CardReleases=CR|fields=CR.ID|join on= C.ID = CR.BaseCardID|where=C.CollInfo='{{{1}}}' AND CR.LanguageCode = '{{{2|EN}}}'|limit=1|no html}}}}</includeonly><noinclude> | </noinclude><includeonly>{{#if: {{#pos:{{{1}}}|-}} | ||
|{{#cargo_query: | |||
tables=Cards=C,CardReleases=CR | |||
|join on= C.ID = CR.BaseCardID | |||
|fields=IFNULL(CR.ID, C.ID) | |||
|where=CR.ID='{{{1}}}' | |||
|limit=1 | |||
|no html | |||
|more results text= | |||
|default=}} | |||
|{{#cargo_query: | |||
tables=Cards=C,CardReleases=CR | |||
|fields=CR.ID | |||
|join on= C.ID = CR.BaseCardID | |||
|where=C.CollInfo='{{{1}}}' AND CR.LanguageCode = '{{{2|EN}}}' | |||
|group by=C.ID | |||
|limit=1 | |||
|no html | |||
|more results text= | |||
|default=}}}}</includeonly><noinclude> | |||
<templatedata> | <templatedata> | ||
{ | { | ||
"params": { | "params": { | ||
"1": { | "1": { | ||
"description": "Collector's info to look up | "description": "Collector's info or Wiki ID to look up", | ||
"example": "1R13" | "example": "1R13 or LOTR-EN01S013.0" | ||
} | } | ||
}, | }, | ||
"description": "Performs a lookup into the cargo Cards database. If a | "description": "Performs a lookup into the cargo Cards database. If a collector's info is passed in, the English CardRelease ID will be returned. If a card WikiID is passed the BaseCard ID will be returned." | ||
} | } | ||
</templatedata> | </templatedata> | ||
</noinclude> | </noinclude> | ||
Latest revision as of 03:08, 6 July 2024
This is the "IDLookup" template.
It should be called in the following format:
{{IDLookup
|1=
|2=
}}
Edit the page to see the template text.
Performs a lookup into the cargo Cards database. If a collector's info is passed in, the English CardRelease ID will be returned. If a card WikiID is passed the BaseCard ID will be returned.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| 1 | 1 | Collector's info or Wiki ID to look up
| Unknown | optional |