Template:CardInfobox: Difference between revisions

From LOTR-TCG Wiki
No edit summary
No edit summary
 
(25 intermediate revisions by the same user not shown)
Line 5: Line 5:
|-
|-
|
|
{{#tag:gallery|{{#cargo_query:tables=Cards=C,CardReleases=CR,Languages=L
{{#tag:gallery|{{#cargo_query:tables=Cards=C,CardReleases=CR,Languages=L,Rarities=R
|join on=C.ID = CR.BaseCardID,CR.LanguageCode=L.Code
|join on=C.ID = CR.BaseCardID,CR.LanguageCode=L.Code,C.Rarity=R.Abbr
|fields= IFNULL(CR.ImageFilename, 'Card_Not_Found.jpg')=Filename,CR.LanguageCode,CR.Subset=Style
|fields= IFNULL(CR.ImageFilename
,'Card_Not_Found.jpg')=Filename
,CR.LanguageCode
,CR.Subset=Style
,R.Name=Rarity
,CR.Revision=Revision
|where=C.ID='{{IDLookup|{{{1}}}}}'
|where=C.ID='{{IDLookup|{{{1}}}}}'
|order by=L.SortOrder,CR._rowID
|order by=L.SortOrder,{{StandardSort}},CR._rowID
|format=template
|format=template
|template=GalleryQuery
|template=GalleryQuery
Line 24: Line 29:
TRIM('Title'), CR.Title,  
TRIM('Title'), CR.Title,  
TRIM('Subtitle'), IFNULL(CR.Subtitle,' '),
TRIM('Subtitle'), IFNULL(CR.Subtitle,' '),
TRIM('Collectible'), IF(C.IsPhysical = 1, 'Yes', 'No'),
TRIM('Unique'), IF(CR.IsUnique = 1, 'Yes', 'No'),
TRIM('Notes'), C.Notes,
TRIM('Collectible'), IF(IFNULL(CR.IsPhysical, C.IsPhysical) = 1, 'Yes', 'No'),
TRIM('Notes'), IFNULL(C.Notes,' '),
TRIM('[[Set]]'), CONCAT(CS.ID, ' - [[', CS.Name, ']]'),
TRIM('[[Set]]'), CONCAT(CS.ID, ' - [[', CS.Name, ']]'),
TRIM('[[Rarity]]'), CONCAT(R.Abbr, ' - [[Rarity{{!}}', R.Name, ']]'),
TRIM('[[Rarity]]'), CONCAT(R.Abbr, ' - [[Rarity{{!}}', R.Name, ']]'),
Line 49: Line 55:
IF(C.IsPlayable = 1, 'Yes', 'No')=Playable,  
IF(C.IsPlayable = 1, 'Yes', 'No')=Playable,  
C.CardType,
C.CardType,
CONCAT('[[Image:', C.Culture, '.svg{{!}}x20px{{!}}text-bottom{{!}}link=', C.Culture, '_Culture{{!}}class=whitebg]] \'\'\'[[', C.Culture, '_Culture{{!}}', C.Culture, ']]\'\'\'')=Culture,
CONCAT('[[Image:Culture_', C.Culture, '.svg{{!}}x20px{{!}}text-bottom{{!}}link=', C.Culture, '_Culture{{!}}class=whitebg]] \'\'\'[[', C.Culture, '_Culture{{!}}', C.Culture, ']]\'\'\'')=Culture,
CONCAT('[[', IF(C.Side='Freeps', 'Free Peoples', C.Side), ']]')=Side,
CONCAT('[[', IF(C.Side='Freeps', 'Free Peoples', C.Side), ']]')=Side,
CT.SubtypeClass, CR.Subtypes,
CT.SubtypeClass, CR.Subtypes,
Line 94: Line 100:
|where=C.ID='{{IDLookup|{{{1}}}}}'  
|where=C.ID='{{IDLookup|{{{1}}}}}'  
AND L.Code NOT IN ('EN', 'TW')
AND L.Code NOT IN ('EN', 'TW')
AND (C.SetNum IN ('9', '14', '16', '19') OR CR.Subset IN 'S')
AND (C.SetNum IN ('9', '14', '16', '19') OR CR.Subset IN ('S'))
|intro=<!--
|intro=<!--
-->{{{!}} class="wikitable mw-collapsible mw-collapsed" style="width:100%;margin:0"
-->{{{!}} class="wikitable mw-collapsible mw-collapsed" style="width:100%;margin:0"
Line 102: Line 108:
|template=TranslationInfoboxTable
|template=TranslationInfoboxTable
|named args= yes
|named args= yes
|outro={{!}}}
|outro=<br>
{{!}}}
|default=
|default=
|delimiter=
|delimiter=

Latest revision as of 15:04, 1 July 2022

This is the "CardInfobox" template.

It should be called in the following format:

{{CardInfobox
|ID=
}}

Edit the page to see the template text.