Difference between revisions of "Template:Info/row"
Jump to navigation
Jump to search
(+) |
(+) |
||
Line 1: | Line 1: | ||
<noinclude> |
<noinclude> |
||
{| class="infobox" style="margin: auto;" |
{| class="infobox" style="margin: auto;" |
||
− | |-</noinclude><!-- |
+ | |-</noinclude><!-- |
− | + | TRACK: -->{{#if:{{{TRACK|}}}|{{info/{{{TRACK}}} }}<!-- |
|
+ | TRACK(^REF): -->{{#if:{{{REF|}}}{{{REFS|}}}|{{info/^ref}}|<!-- ELSE -->}}<!-- |
||
− | ! {{{attr1|}}} | {{{1}}} |
||
+ | TRACK(+CAT): -->{{#if:{{{CAT|}}}{{{CATS|}}}|{{info/+cat}}|<!-- ELSE -->}}<!-- |
||
− | | {{{attr2|}}} | {{{2}}} |
||
+ | /TRACK -->}} |
||
+ | |- class="{{{line-class |}}}" style="{{{line-style |}}}" {{{line-attrs |}}} |
||
+ | ! class="{{{title-class|}}}" style="{{{title-style|}}}" {{{title-attrs|}}} | {{{TITLE}}} |
||
+ | | class="{{{cell-class |}}}" style="{{{cell-style |}}}" {{{cell-attrs |}}} |<!-- |
||
+ | |||
+ | IF: -->{{#if:{{{LINK|}}}|<!-- |
||
+ | LINK: -->[[{{{LINK}}}|{{{LINK-TEXT|{{{LINK}}}}|<!-- /LINK-TEXT -->}}}]]<!-- /LINK |
||
+ | REF: -->{{{REFS|{{{REF|}}}|}}}<!-- /REF |
||
+ | ELSE:-->|<!-- |
||
+ | TEXT: -->{{{TEXT}}}<!-- /TEXT |
||
+ | REF: -->{{{REFS|{{{REF|}}}|}}}<!-- /REF |
||
+ | /IF-->}}<!-- |
||
+ | |||
+ | CATEGORIES: -->{{{CATS|{{#if:{{{CAT|}}}|<!-- CAT:-->[[category: {{{CAT}}}]]<!-- /IF -->}}<!-- /CATS -->|}}}<!-- --> |
||
|-<noinclude> |
|-<noinclude> |
||
|} |
|} |
||
− | This template should be used on {{t|infobox}} templates. |
+ | This template should be used on {{t|infobox}} templates. It uses caps-case attributes to make it obvious that it is not a normal template. |
+ | |||
+ | === Template === |
||
+ | |||
+ | <pre class=mw-code> |
||
+ | {{architecture |
||
+ | |TITLE= |
||
+ | |TEXT= |
||
+ | |LINK= |
||
+ | |LINK-TEXT= |
||
+ | |CAT= |
||
+ | |CATS= |
||
+ | |REF= |
||
+ | |REFS= |
||
+ | |class= |
||
+ | |line-class= |
||
+ | |title-class= |
||
+ | |cell-class= |
||
+ | |line-style= |
||
+ | |title-style= |
||
+ | |cell-style= |
||
+ | |line-attr= |
||
+ | |title-attr= |
||
+ | |cell-attr= |
||
+ | }} |
||
+ | </pre> |
||
+ | |||
+ | === Parameters === |
||
+ | Highlighted lines indicate '''mandatory''' parameters. |
||
+ | |||
+ | {{docs}} |
||
+ | |||
+ | {{docs/row/required |param= TITLE |desc= the title of this information row }} |
||
+ | {{docs/row/optional |param= TEXT |desc= plain text to fill the row with }} |
||
+ | {{docs/row/optional |param= LINK |desc= instead of passing <code>TEXT</code> generate a link to this page }} |
||
+ | {{docs/row/optional |param= LINK-TEXT |desc= customize the link text of the passed <code>LINK</code> parameter }} |
||
+ | {{docs/row/optional |param= REF |desc= insert a citation straight after the <code>TEXT</code> or <code>LINK</code> parameters }} |
||
+ | {{docs/row/optional |param= REFS |desc= insert some citation straight after the <code>TEXT</code> or <code>LINK</code> parameters }} |
||
+ | {{docs/row/optional |param= CAT |desc= categorise the page with this category }} |
||
+ | {{docs/row/optional |param= CATS |desc= pass categories to insert on this row }} |
||
⚫ | |||
+ | |||
+ | {{docs/row/optional |param= line-class |desc= CSS classes to use on the row element }} |
||
+ | {{docs/row/optional |param= title-class |desc= CSS classes to use on the title cell }} |
||
+ | {{docs/row/optional |param= cell-class |desc= CSS classes to use on the main cell }} |
||
+ | {{docs/row/optional |param= line-style |desc= additional CSS styles to use on the row element }} |
||
+ | {{docs/row/optional |param= title-style |desc= additional CSS styles to use on the title cell }} |
||
+ | {{docs/row/optional |param= cell-style |desc= additional CSS styles to use on the main cell }} |
||
+ | {{docs/row/optional |param= line-attrs |desc= additional HTML attributes to use on the row element }} |
||
+ | {{docs/row/optional |param= title-attrs |desc= additional HTML attributes to use on the title cell }} |
||
+ | {{docs/row/optional |param= cell-attrs |desc= additional HTML attributes to use on the main cell }} |
||
+ | |||
+ | |}<!-- /docs --> |
||
⚫ | |||
[[category: rows|info]] |
[[category: rows|info]] |
Revision as of 19:49, 21 April 2020
{{{TITLE}}} | {{{TEXT}}} |
---|
This template should be used on {{infobox}}
templates. It uses caps-case attributes to make it obvious that it is not a normal template.
Template
{{architecture |TITLE= |TEXT= |LINK= |LINK-TEXT= |CAT= |CATS= |REF= |REFS= |class= |line-class= |title-class= |cell-class= |line-style= |title-style= |cell-style= |line-attr= |title-attr= |cell-attr= }}
Parameters
Highlighted lines indicate mandatory parameters.
Parameter | Description | Examples |
---|---|---|
TITLE
|
the title of this information row |
{{{eg}}} |
TEXT
|
plain text to fill the row with |
{{{eg}}} |
LINK
|
instead of passing TEXT generate a link to this page
|
{{{eg}}} |
LINK-TEXT
|
customize the link text of the passed LINK parameter
|
{{{eg}}} |
REF
|
insert a citation straight after the TEXT or LINK parameters
|
{{{eg}}} |
REFS
|
insert some citation straight after the TEXT or LINK parameters
|
{{{eg}}} |
CAT
|
categorise the page with this category |
{{{eg}}} |
CATS
|
pass categories to insert on this row |
{{{eg}}} |
TRACK
|
use to include the {{info/{{{TRACK}}} }} tracking template on the page.
|
{{{eg}}} |
line-class
|
CSS classes to use on the row element |
{{{eg}}} |
title-class
|
CSS classes to use on the title cell |
{{{eg}}} |
cell-class
|
CSS classes to use on the main cell |
{{{eg}}} |
line-style
|
additional CSS styles to use on the row element |
{{{eg}}} |
title-style
|
additional CSS styles to use on the title cell |
{{{eg}}} |
cell-style
|
additional CSS styles to use on the main cell |
{{{eg}}} |
line-attrs
|
additional HTML attributes to use on the row element |
{{{eg}}} |
title-attrs
|
additional HTML attributes to use on the title cell |
{{{eg}}} |
cell-attrs
|
additional HTML attributes to use on the main cell |
{{{eg}}} |