Template:Active/doc: Difference between revisions

From HIBIKIFORUM
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
Line 3: Line 3:
The templates in this series are designed to be used in a table to make a cell with text in that cell, with an appropriately colored background.
The templates in this series are designed to be used in a table to make a cell with text in that cell, with an appropriately colored background.


For example, {{tlc|Active}} makes a cell with a green check mark and background. The text in the cell is taken from the first parameter; {{Active|Yes}} would output "Yes" otherwise it defaults to "Active". Most templates allow editors to override the default text in this way.
For example, {{tlc|Active}} makes a cell with a green check mark and background. The text in the cell is taken from the first parameter; {{tlc|Active|Yes}} would output "Yes" otherwise it defaults to "Active". Most templates allow editors to override the default text in this way.


{{fcb|red|Important}}: If you want to use other attributes for the table cells, ''e.g.'' {{code|colspan}}, {{code|rowspan}}, or {{code|style}}, they need to be put before the template call, and there must be '''no vertical bar (aka pipe) <code>|</code>''' in-between them:
{{fcb|red|Important}}: If you want to use other attributes for the table cells, ''e.g.'' {{code|colspan}}, {{code|rowspan}}, or {{code|style}}, they need to be put before the template call, and there must be '''no vertical bar (aka pipe) <code>|</code>''' in-between them:

Latest revision as of 03:37, 5 September 2023

Light bulb.png }}
It contains usage information, categories and other content that is not part of the original template page.

The templates in this series are designed to be used in a table to make a cell with text in that cell, with an appropriately colored background.

For example, {{Active}} makes a cell with a green check mark and background. The text in the cell is taken from the first parameter; {{Active|Yes}} would output "Yes" otherwise it defaults to "Active". Most templates allow editors to override the default text in this way.

Important: If you want to use other attributes for the table cells, e.g. colspan, rowspan, or style, they need to be put before the template call, and there must be no vertical bar (aka pipe) | in-between them:

Green check.png Yes Red x.png No Unsure
-
...
! {{Active|Yes}} || {{Defunct|No}} || rowspan=2 {{Unknown|Unsure}}
|-
|colspan=2 style="border:solid 3px Maroon" {{Unknown|-}}
...

Templates

Table cell templates
Default Customized
Syntax Preview Syntax Preview
{{Active}} Green check.png Active {{Active|Yes}} Green check.png Yes
{{Defunct}} Red x.png Defunct {{Defunct|No}} Red x.png No
{{Unknown}} ? {{Unknown|Dunno}} Dunno

TemplateData

One of several templates for styling individual table cells with standard contents and colors.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Alt Text1

To display alternate text.

Default
Template Dependant
Stringoptional