Template:TableAttributeNew: Difference between revisions
From The Seven Sages of Rome
No edit summary |
No edit summary |
||
| Line 14: | Line 14: | ||
Renamed from TableAttribute for scoped testing. | Renamed from TableAttribute for scoped testing. | ||
</noinclude><includeonly>{{#if:{{{value|}}}|<div class="cc-attr-row" {{#if:{{{padding|}}}|style="--depth:{{{padding}}}"}}><div class="cc-attr-label" {{#if:{{{padding|}}}|data-depth="{{{padding|}}}"}}> | </noinclude><includeonly>{{#if:{{{value|}}}|<div class="cc-attr-row" {{#if:{{{padding|}}}|style="--depth:{{{padding}}}"}}>{{#ifeq:{{{label|}}}|hide||<div class="cc-attr-label" {{#if:{{{padding|}}}|data-depth="{{{padding|}}}"}}><span class="cc-attr-label-inner">{{{display_name|}}}</div>}}<div class="cc-attr-value">{{#switch:{{{type|}}}|file=[[File:{{{value}}}|thumbnail|{{{value}}}]]|text={{#set:{{{property|}}}={{{value|}}}}}{{#if:{{{form|}}}|{{#formredlink:target={{{value|}}}|form={{{form|}}}}}|{{{value|}}}}}|attr={{#set:{{{property|}}}={{{value|}}}}}{{#if:{{{form|}}}|{{#formredlink:target={{{value|}}}|form={{{form|}}}}}|[[{{{value|}}}]]}}|list={{#arraymap:{{{value|}}}|;|x|{{#set:{{{property|}}}=x}}{{#if:{{{form|}}}|{{#formredlink:target=x|form={{{form|}}}}}|x}}|, }}|#default={{{value|}}}}}</div></div>}}</includeonly> | ||
Latest revision as of 08:50, 26 February 2026
Usage
{{TableAttributeNew |type=[file,text,attr,list] |display_name=the displayed name |value=the value to set |property=the property name |form=the form to link to |padding=padding depth (1,2,3,4) |label=hide (optional, omits the label column for single-value cards) }}
Renamed from TableAttribute for scoped testing.