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|}}}| cc-attr-row--child cc-depth-{{{padding}}}}}">{{#ifeq:{{{label|}}}|hide||<div class="cc-attr-label"><span class="cc-attr-label-inner">{{{display_name|}}}</span></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}}|,&nbsp;}}|#default={{{value|}}}}}</div></div>}}</includeonly>
</noinclude><includeonly>{{#if:{{{value|}}}|<div class="cc-attr-row{{#if:{{{padding|}}}| cc-attr-row--child}}">{{#ifeq:{{{label|}}}|hide||<div class="cc-attr-label{{#if:{{{padding|}}}| cc-depth-{{{padding}}}}}"><span class="cc-attr-label-inner">{{{display_name|}}}</span></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}}|,&nbsp;}}|#default={{{value|}}}}}</div></div>}}</includeonly>

Revision as of 21:18, 25 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.