Template:AlternateVersionTable: Difference between revisions

From LOTR-TCG Wiki
(adding smarter sorting logic)
(added promo filter)
Line 11: Line 11:
AND '{{TitleLookup|{{{1}}}}}' = C.Title  
AND '{{TitleLookup|{{{1}}}}}' = C.Title  
AND C.CollInfo != '{{{1}}}'
AND C.CollInfo != '{{{1}}}'
AND {{PromoFilter}}
|order by=CASE WHEN C.SetNum = '0' THEN 100 ELSE CASE WHEN C.SETNUM REGEXP '^-?[0-9]+$' THEN CAST(C.SetNum AS UNSIGNED INTEGER) ELSE 100 END END, CASE WHEN C.Subset = 'S' THEN 0 WHEN C.Subset = 'F' THEN 1 WHEN C.Subset = 'P' THEN 0 WHEN C.Subset = 'D' THEN 1 ELSE 10 END, C.CardNum
|order by=CASE WHEN C.SetNum = '0' THEN 100 ELSE CASE WHEN C.SETNUM REGEXP '^-?[0-9]+$' THEN CAST(C.SetNum AS UNSIGNED INTEGER) ELSE 100 END END, CASE WHEN C.Subset = 'S' THEN 0 WHEN C.Subset = 'F' THEN 1 WHEN C.Subset = 'P' THEN 0 WHEN C.Subset = 'D' THEN 1 ELSE 10 END, C.CardNum
|intro=<!--
|intro=<!--

Revision as of 04:02, 30 December 2021

This is the "AlternateVersionTable" template.

It should be called in the following format:

{{AlternateVersionTable
|1=
}}

Edit the page to see the template text.