Template:TableAttribute: Difference between revisions
From Seven Sages of Rome
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
| '''{{{display_name|}}}''' || {{#switch:{{{type|}}} | | '''{{{display_name|}}}''' || {{#switch:{{{type|}}} | ||
| file = {{#if:{{{value|}}}|[[File:{{{value}}}|thumbnail|{{{value|}}}]]}} | | file = {{#if:{{{value|}}}|[[File:{{{value}}}|thumbnail|{{{value|}}}]]}} | ||
| text = {{#if:{{{value|}}}|{{#if:{{{form|}}} | | text = {{#if:{{{value|}}}|{#set:{{{property}}}={{{value|}}}}} {{#if:{{{form|}}}|{{#formredlink:target={{{value|}}}|form={{{form|}}}}}|{{{value|}}}}}}} | ||
| attr = {{#if:{{{value|}}}|[[{{{property|}}}::{{{value|}}}]]}} | | attr = {{#if:{{{value|}}}|[[{{{property|}}}::{{{value|}}}]]}} | ||
| list = {{#arraymap:{{{value|}}}|;|x|[[{{{property|}}}::x]]|, }} | | list = {{#arraymap:{{{value|}}}|;|x|[[{{{property|}}}::x]]|, }} |
Revision as of 09:42, 22 January 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}}