Template:CardSearch: Difference between revisions
From LOTR-TCG Wiki
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
{{#template_params:isUnique|sort}} | {{#template_params:isUnique|sort}} | ||
</noinclude><includeonly> | </noinclude><includeonly> | ||
{{#cargo_query:tables=Cards=C,CardReleases=CR | {{#cargo_query:tables=Cards=C,CardReleases=CR,CardSets=S | ||
|join on=C.ID = CR.ID | |join on=C.ID = CR.ID,C.SetNum=S.ID | ||
|fields=CONCAT('[[Image:Culture_', C.Culture, '.svg|x20px|text-bottom|link=', C.Culture, '_Culture|class=whitebg]]', ' <span class="tooltip">[[', REPLACE(REPLACE(C._pageName, '/Data', ''), 'Data:', ''), '|', CR.Title, CASE WHEN CR.Subtitle IS NULL THEN '' ELSE CONCAT(', ', CR.Subtitle) END, ' (', IFNULL(CR.CollInfo,C.CollInfo), ')]]<span>[[File:', IFNULL(CR.ImageFilename,'Card_Not_Found.jpg'), '|500x500px]]</span></span>')=CardName | |fields=CONCAT('[[Image:Culture_', C.Culture, '.svg|x20px|text-bottom|link=', C.Culture, '_Culture|class=whitebg]]', ' <span class="tooltip">[[', REPLACE(REPLACE(C._pageName, '/Data', ''), 'Data:', ''), '|', CR.Title, CASE WHEN CR.Subtitle IS NULL THEN '' ELSE CONCAT(', ', CR.Subtitle) END, ' (', IFNULL(CR.CollInfo,C.CollInfo), ')]]<span>[[File:', IFNULL(CR.ImageFilename,'Card_Not_Found.jpg'), '|500x500px]]</span></span>')=CardName | ||
|where= ('{{{isUnique|any}}}' = 'any' OR CR.IsUnique = CASE WHEN '{{{isUnique|any}}}' = 'yes' THEN 1 WHEN '{{{isUnique|any}}}' = 'no' THEN 0 ELSE 2 END) | |where= ('{{{isUnique|any}}}' = 'any' OR CR.IsUnique = CASE WHEN '{{{isUnique|any}}}' = 'yes' THEN 1 WHEN '{{{isUnique|any}}}' = 'no' THEN 0 ELSE 2 END) | ||
AND ('{{{creator|}}}' = '' OR S.Creator = '{{{creator|}}}') | |||
|order by={{{sort|{{CultureSort}}}}} | |order by={{{sort|{{CultureSort}}}}} | ||
|limit=100 | |limit=100 |
Revision as of 22:36, 24 September 2022
This is the "CardSearch" template.
It should be called in the following format:
{{CardSearch |isUnique= |sort= }}
Edit the page to see the template text.