Difference between revisions of "Template:CTableStart"

From blackwiki
Jump to navigation Jump to search
imported>Technical 13
m (make this as HTML5 compliant as I can... Will need another pass if kept to bring it completely up to standards. Uses will likely need to be fixed as well.)
imported>GhostInTheMachine
m (more specific cat)
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Template for discussion/dated|page=CTableStart|link=Wikipedia:Templates for discussion/Log/2014 November 1#Template:CTableStart|help=off}}
+
<includeonly>{| class="{{#if:{{NAMESPACE}}|collapsible {{
<includeonly>{| class="collapsible {{
 
 
#ifeq: {{lc: {{{collapsed|true}}} }}
 
#ifeq: {{lc: {{{collapsed|true}}} }}
 
   | true
 
   | true
 
   | collapsed
 
   | collapsed
}}" style="background-color: none; clear: both; width: {{{table-width|100%}}};" align="{{{table-align|}}}"
+
}}}}" style="background-color: none; clear: both; width: {{{table-width|100%}}};" align="{{{table-align|}}}"
 
! style="background: {{{bgcolor|lightgrey}}}; color: {{{fgcolor|black}}}; width: 100%; text-align: {{{align|center}}};" | <span style="font-size: {{{fontsize|small}}};">{{{heading|ERROR: No heading specified}}}</span>
 
! style="background: {{{bgcolor|lightgrey}}}; color: {{{fgcolor|black}}}; width: 100%; text-align: {{{align|center}}};" | <span style="font-size: {{{fontsize|small}}};">{{{heading|ERROR: No heading specified}}}</span>
 
|- style="background: {{{text-bgcolor|none}}}; color: {{{text-fgcolor|black}}}; text-align: {{{text-align|left}}};"
 
|- style="background: {{{text-bgcolor|none}}}; color: {{{text-fgcolor|black}}}; text-align: {{{text-align|left}}};"
Line 69: Line 68:
 
}}
 
}}
  
[[Category:Table and column templates]]
+
[[Category:Templates with partial table wikitext]]
 
</noinclude>
 
</noinclude>

Latest revision as of 18:17, 10 June 2020

Template documentation

Usage

The default values, if the parameter is not specified, are shown below.

{{CTableStart
| heading=
| collapsed=true
| table-align=
| table-width=100%
| bgcolor=lightgrey
| fgcolor=black
| align=center
| fontsize=2
| text-bgcolor=none
| text-fgcolor=black
| text-align=left
}}

Parameters

Required

  • heading
  • Text for the heading

Optional

  • collapsed
  • to show or hide the table contents by default
  • table-align
  • table alignment
  • table-width
  • width of the table
  • bgcolor
  • background colour of the heading
  • fgcolor
  • foreground colour of the heading
  • align
  • heading text alignment
  • fontsize
  • font size of heading text
  • text-bgcolor
  • background colour of the body
  • text-fgcolor
  • foreground colour of the body
  • text-align
  • body text alignment

Example

{{CTableStart|heading=heading text|table-width=80%}}
body text
{{CTableEnd}}

See also