Template:Collection table: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 17: Line 17:
{{#if: {{{1|}}}|<nowiki></nowiki>
{{#if: {{{1|}}}|<nowiki></nowiki>
{{!}}-
{{!}}-
{{!}} {{#if: {{{postfix|}}}|{{linkappend|post=&nbsp;({{{postfix|}}})| {{{2|}}} }}|[[{{{2|}}}]]}}}}{{#if: {{{3|}}}|<nowiki></nowiki>
{{!}} {{#if: {{{attribute|}}}<!--
-->| {{#if: {{{postfix|}}} | [[{{lc:{{{2|}}}}} ({{{postfix|}}})|{{{2|}}}]] | [[{{lc:{{{2|}}}}}|{{{2|}}}]]}}<!--
-->| {{#if: {{{postfix|}}}|{{linkappend|post=&nbsp;({{{postfix|}}})| {{{2|}}} }}|[[{{{2|}}}]]}}<!--
-->}}}}{{#if: {{{3|}}}|<nowiki></nowiki>
{{!}} {{{4|}}}|}}{{#if: {{{5|}}}|<nowiki></nowiki>
{{!}} {{{4|}}}|}}{{#if: {{{5|}}}|<nowiki></nowiki>
{{!}} {{{6|}}}|}}{{#if: {{{7|}}}|<nowiki></nowiki>
{{!}} {{{6|}}}|}}{{#if: {{{7|}}}|<nowiki></nowiki>

Revision as of 14:09, 29 June 2020

Parameters
  • type: table:
    • suppresscategory:
    • allowselflink:
    • content:
    • postfix:
    • category:
    • 1...n
  • type: row:
    • named parameters as defined by the table structure
Usage

Create an intermediate category with the following approximate structure:

{{collection table
| type={{{type|table}}}
| suppresscategory={{{suppresscategory|<noinclude>template</noinclude>}}}
| allowselflink={{{allowselflink}}}
| content={{{1|}}}
| postfix=Panel Attribute
| category=Panel Attributes
| Attribute name | {{{attribute|}}}<!--
-->| Unit | {{{unit|}}}<!--
-->| Description | {{{description|}}}<!--
-->}}

Set the category to the category the individual entries need to be collected under (plural). Set the postfix to the clarifying term in the parenthesis in the title (singular). The remainder of the attributes come in pairs: The name in the header, and the parameter used in the rows.

Category is automatically included on the page that template is used on (unless supressed) if a category is configured. The first value in the table is automaticallly postfixed if a postfix is configured.