Template:TableAttribute: Difference between revisions

From Seven Sages of Rome
No edit summary
No edit summary
 
(32 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
== Usage ==
<nowiki>
{{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
}}
</nowiki>
</noinclude>
<includeonly>
<includeonly>
| '''{{{2}}}''' || {{#switch:{{{1}}}
| {{#if:{{{padding|}}}|style="padding-left: {{{padding|}}}px; background: #f5f5f5" {{!}}└|}} '''{{{display_name|}}}''' || {{#switch:{{{type|}}}
| file = {{#if:{{{3|}}}|[[File:{{{3}}}|thumbnail|{{{3}}}]]}}
| file = {{#if:{{{value|}}}|[[File:{{{value}}}|thumbnail|{{{value|}}}]]}}
| text = {{#if:{{{3|}}}|[[{{{2}}}::{{{3}}}|]]{{{3}}}}}
| text = {{#if:{{{value|}}}|{{#set:{{{property|}}}={{{value|}}}}}{{#if:{{{form|}}}|{{#formredlink:target={{{value|}}}|form={{{form|}}}}}|{{{value|}}}}}}}
| attr = {{#if:{{{3|}}}|[[{{{4}}}::{{{3}}}]]}}
| attr = {{#if:{{{value|}}}|{{#set:{{{property|}}}={{{value|}}}}}{{#if:{{{form|}}}|{{#formredlink:target={{{value|}}}|form={{{form|}}}}}|{{{value|}}}}}}}
| list = {{#arraymap:{{{3|}}}|;|x|[[{{{2}}}::x]]|;&#32;}}
| list = {{#arraymap:{{{value|}}}|;|x|{{#set:{{{property|}}}=x}}{{#if:{{{form|}}}|{{#formredlink:target=x|form={{{form|}}}}}|x}}|,&nbsp;}}
| #default = {{#if:{{{3|}}}|{{{3}}}}}
| #default = {{#if:{{{value|}}}|{{{value|}}}}}
}}
}}
</includeonly>
</includeonly>

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 }}