Difference between revisions of "Template:Card table"
Dinoguy1000 (talk | contribs) (document the image validation stuff in a comment; support up to 20 rows instead of just 15 (needed for {{Anime card}} and I think it'll be needed for CT2 as well)) |
Dinoguy1000 (talk | contribs) (categorize all cards in a common category) |
||
Line 192: | Line 192: | ||
|| {{ #if: {{NAMESPACE}} | || {{ #if: {{NAMESPACE}} | ||
| <!-- non-mainspace categories here -->{{ #ifeq: {{ns:template}}:{{BASEPAGENAME}} | {{FULLPAGENAME}} | [[Category:Card table templates]] }} | | <!-- non-mainspace categories here -->{{ #ifeq: {{ns:template}}:{{BASEPAGENAME}} | {{FULLPAGENAME}} | [[Category:Card table templates]] }} | ||
− | | {{ #ifexist: Card Gallery:{{ #var: $main | {{Normalized pagename|{{PAGENAME}}}} }} | + | | [[Category:All cards]]{{ #ifexist: Card Gallery:{{ #var: $main | {{Normalized pagename|{{PAGENAME}}}} }} |
|| [[Category:Cards that need a gallery]] | || [[Category:Cards that need a gallery]] | ||
}}[[Page name::{{Normalized pagename|{{FULLPAGENAME}}}}| ]][[Page type::Card page| ]] | }}[[Page name::{{Normalized pagename|{{FULLPAGENAME}}}}| ]][[Page type::Card page| ]] | ||
}} | }} | ||
}}{{ #vardefine: $first_card_table | 1 }}<noinclude>{{Documentation}}</noinclude> | }}{{ #vardefine: $first_card_table | 1 }}<noinclude>{{Documentation}}</noinclude> |
Revision as of 10:41, 4 September 2018
{{{title}}}
{{{above}}}
{{{above_image}}}
[[File:|0px|link=File:]]
{{{below_image}}}
{{{below}}}
This template uses Lua: |
{{Card table}} is a metatemplate used to create card table templates.
Usage
Example
{{Card table | title = {{ #if: {{{title|}}} | {{{title}}} | {{PAGENAME}} }} | image = {{ #if: {{{image|}}} | {{{image}}} | Back-EN.png }} | label1 = [[Attribute]] | data1 = [[{{uc:{{{attribute}}}}}]] [[File:{{uc:{{{attribute}}}}}.svg|25px|alt=]] | label2 = [[Level]] | data2 = {{{level}}} {{Repeat|[[File:CG Star.svg|18px|alt=]]|{{{level}}}}} | label3 = [[Type|Type(s)]] | data3 = {{Card table/types|{{{types}}}|{{{effect_types|}}}|linked}} | label4 = [[ATK]]/[[DEF]] | data4 = {{{atk}}}/{{{def}}} | data5 = <div class="lore">{{{lore}}}</div> | label6 = Effect types | data6 = {{{effect types|}}} | label7 = Status | data7 = {{{status}}} }}