Template:TableAttribute: Difference between revisions
From Seven Sages of Rome
No edit summary |
No edit summary |
||
Line 8: | Line 8: | ||
|property=the property name | |property=the property name | ||
|form=the form to link to | |form=the form to link to | ||
|padding=padding on the left | |||
}} | }} | ||
</nowiki> | </nowiki> | ||
Line 15: | Line 16: | ||
| 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|}}}}}}} | ||
| attr = {{#if:{{{value|}}}|{{#set:{{{property|}}}={{{value|}}}}}{{#if:{{{form|}}}|{{#formredlink:target={{{value|}}}|form={{{form|}}}}}|{{{value|}}}}}}} | | {{#if:{{{padding|}}}|style="padding: 50px"|}} attr = {{#if:{{{value|}}}|{{#set:{{{property|}}}={{{value|}}}}}{{#if:{{{form|}}}|{{#formredlink:target={{{value|}}}|form={{{form|}}}}}|{{{value|}}}}}}} | ||
| list = {{#arraymap:{{{value|}}}|;|x|{{#set:{{{property|}}}=x}}{{#if:{{{form|}}}|{{#formredlink:target=x|form={{{form|}}}}}|x}}|, }} | | list = {{#arraymap:{{{value|}}}|;|x|{{#set:{{{property|}}}=x}}{{#if:{{{form|}}}|{{#formredlink:target=x|form={{{form|}}}}}|x}}|, }} | ||
| #default = {{#if:{{{value|}}}|{{{value|}}}}} | | #default = {{#if:{{{value|}}}|{{{value|}}}}} | ||
}} | }} | ||
</includeonly> | </includeonly> |
Revision as of 18:16, 13 February 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 }}