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> | ||
| '''{{{ | | '''{{{display_name|}}}''' || {{#switch:{{{type|}}} | ||
| file = {{#if:{{{ | | file = {{#if:{{{value|}}}|[[File:{{{value}}}|thumbnail|{{{value|}}}]]}} | ||
| text = {{#if:{{{ | | text = {{#if:{{{value|}}}|{{#set:{{{property}}}={{{value|}}}}}{{{value|}}}}} | ||
| attr = {{#if:{{{ | | attr = {{#if:{{{value|}}}|[[{{{property|}}}::{{{value|}}}]]}} | ||
| list = {{#arraymap:{{{ | | list = {{#arraymap:{{{value|}}}|;|x|[[{{{property|}}}::x]]|, }} | ||
| #default = {{#if:{{{ | | #default = {{#if:{{{value|}}}|{{{value|}}}}} | ||
}} | }} | ||
</includeonly> | </includeonly> |
Revision as of 09:18, 22 January 2024
Usage
| the displayed name || the value to set