Template:TableAttribute: Difference between revisions

From Seven Sages of Rome
No edit summary
No edit summary
Line 1: Line 1:
<noinclude>
== 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}}
</noinclude>
<includeonly>
<includeonly>
| '''{{{2}}}''' || {{#switch:{{{1}}}
| '''{{{display_name|}}}''' || {{#switch:{{{type|}}}
| file = {{#if:{{{3|}}}|[[File:{{{3}}}|thumbnail|{{{3}}}]]}}
| file = {{#if:{{{value|}}}|[[File:{{{value}}}|thumbnail|{{{value|}}}]]}}
| text = {{#if:{{{3|}}}|{{#set:{{{4}}}={{{3}}}}}{{{3}}}}}
| text = {{#if:{{{value|}}}|{{#set:{{{property}}}={{{value|}}}}}{{{value|}}}}}
| attr = {{#if:{{{3|}}}|[[{{{4}}}::{{{3}}}]]}}
| attr = {{#if:{{{value|}}}|[[{{{property|}}}::{{{value|}}}]]}}
| list = {{#arraymap:{{{3|}}}|;|x|[[{{{4}}}::x]]|,&nbsp;}}
| list = {{#arraymap:{{{value|}}}|;|x|[[{{{property|}}}::x]]|,&nbsp;}}
| #default = {{#if:{{{3|}}}|{{{3}}}}}
| #default = {{#if:{{{value|}}}|{{{value|}}}}}
}}
}}
</includeonly>
</includeonly>

Revision as of 09:18, 22 January 2024

Usage

| the displayed name || the value to set