Template:TableAttribute: Difference between revisions

From Seven Sages of Rome
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 13: Line 13:
</noinclude>
</noinclude>
<includeonly>
<includeonly>
| {{#if:{{{padding|}}}|style="padding-left: {{{padding|}}}px; background: #f5f5f5" {{!}}|}} '''{{{display_name|}}}''' |{{#if:{{{padding|}}}|style="background: #f5f5f5" {{!}}|}}| {{#switch:{{{type|}}}
| {{#if:{{{padding|}}}|style="padding-left: {{{padding|}}}px; background: #f5f5f5" {{!}}|}} '''{{{display_name|}}}''' || {{#switch:{{{type|}}}
| file = {{#if:{{{value|}}}|[[File:{{{value}}}|thumbnail|{{{value|}}}]]}}
| file = {{#if:{{{value|}}}|[[File:{{{value}}}|thumbnail|{{{value|}}}]]}}
| text = {{#if:{{{value|}}}|{{#set:{{{property|}}}={{{value|}}}}}{{#if:{{{form|}}}|{{#formredlink:target={{{value|}}}|form={{{form|}}}}}|{{{value|}}}}}}}
| text = {{#if:{{{value|}}}|{{#set:{{{property|}}}={{{value|}}}}}{{#if:{{{form|}}}|{{#formredlink:target={{{value|}}}|form={{{form|}}}}}|{{{value|}}}}}}}

Latest revision as of 10:20, 4 June 2024

Usage

{{TableAttribute |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 on the left }}