Template:Infobox Card: Difference between revisions

Jump to navigation Jump to search
Add error handling for invalid traits.
(Add cards only to the weapons category if they are actually an item.)
(Add error handling for invalid traits.)
Line 93: Line 93:
|}}
|}}
|-
|-
{{#if:{{ValidateTrait|{{{trait|}}}}}{{ValidateTrait|{{{trait2|}}}}}|
{{#if:{{{trait|}}}{{{trait2|}}}|
  {{#if:{{ValidateTrait|{{{trait2|}}}}}|
  {{#if:{{ValidateTrait|{{{trait|}}}}}{{ValidateTrait|{{{trait2|}}}}}|
    {{!}} align=center width=50% style="border:0px transparent"{{!}}Traits:
    {{#if:{{ValidateTrait|{{{trait2|}}}}}|
    {{!}} align=center style="border:0px transparent"{{!}}[[:Category:{{ValidateTrait|{{{trait|}}}}}|{{ValidateTrait|{{{trait|}}}}}]], [[:Category:{{ValidateTrait|{{{trait2|}}}}}|{{ValidateTrait|{{{trait2|}}}}}]]
      {{!}} align=center width=50% style="border:0px transparent"{{!}}Traits:
    |
      {{!}} align=center style="border:0px transparent"{{!}}[[:Category:{{ValidateTrait|{{{trait|}}}}}|{{ValidateTrait|{{{trait|}}}}}]], [[:Category:{{ValidateTrait|{{{trait2|}}}}}|{{ValidateTrait|{{{trait2|}}}}}]]
    {{!}} align=center width=50% style="border:0px transparent"{{!}}Trait:
      |
    {{!}} align=center style="border:0px transparent"{{!}}[[:Category:{{ValidateTrait|{{{trait|}}}}}|{{ValidateTrait|{{{trait|}}}}}]]
      {{!}} align=center width=50% style="border:0px transparent"{{!}}Trait:
      {{!}} align=center style="border:0px transparent"{{!}}[[:Category:{{ValidateTrait|{{{trait|}}}}}|{{ValidateTrait|{{{trait|}}}}}]]
    }}
  |
    {{!}}colspan= 2 align=center style="border:0px transparent"{{!}}[[Template:ValidateTrait|Invalid Trait. Read the template documentation for valid traits]]
   }}
   }}
|}}
|}}

Navigation menu