User:Sardanaphalus/Template:Column-generating template families

From Wikipedia, the free encyclopedia

Can handle wiki-style table code {| | || |- |} directly[edit]

Col-float[edit]

{{Col-float}}
<div class="{{{class|}}}" style="clear: none; float: left; width: {{#if:{{{width|}}}|{{{width}}}|30em;}}; {{{style|}}}" >
{{Col-float-break}}
</div>{{col-float|class={{{class|}}}|style={{{style|}}}|width={{{width|}}}}}
{{Col-float-end}}
</div><div class="{{{class|}}}" style="clear: left; float: none; {{{style|}}}" ></div>


{{Columns}}[edit]

<table class="multicol"
       style="{{#switch:{{{align|}}} |left|right=float:{{{align}}}; |center=margin:0.5em auto;}}<!--
           -->border-spacing:0;background:{{{background|{{{bgcol|transparent}}}}}};<!--
           -->{{#if:{{{text-align|}}} |text-align:{{{text-align}}};}}<!--
           -->{{{style|}}}"
       role="presentation">
 <tr style="vertical-align:top;">
     <td style="width:{{{col1width|{{{colwidth|{{{width|15.0em}}}}}}}}};{{{colstyle|}}};{{{col1style}}};">{{#if:1|{{{col1}}}}}</td>
     <td style="width:{{{gapbetween|{{{gap|1.25em}}}}}};"></td>
     <td style="width:{{{col2width|{{{colwidth|{{{width|15.0em}}}}}}}}};{{{colstyle|}}};{{{col2style}}};">{{#if:1|{{{col2}}}}}</td><!--
  -->{{#if:{{{col3<includeonly>|</includeonly>}}}
      | <td style="width:{{{gapbetween|{{{gap|1.25em}}}}}};"></td>
        <td style="width:{{{col3width|{{{colwidth|{{{width|15.0em}}}}}}}}};{{{colstyle|}}};{{{col3style}}};">{{#if:1|{{{col3}}}}}</td>}}<!--
  -->{{#if:{{{col4<includeonly>|</includeonly>}}}

[etc]


Columns-start etc[edit]

{{Columns-start}}
<div class="columns-{{{num|2}}} {{{class|}}}" style="background-color: {{{bgColor|{{{bgcolor|transparent}}}}}}; width: {{{width|100%}}}"><div class="column">
{{Column}}
</div><div class="column">
{{Columns-end}}
</div><div style="clear: both"></div></div>


Div col[edit]

{{Div col}} (Start div col)
<div class="div-col columns {{#if:{{{colwidth|{{{2|}}}}}} |column-width |column-count column-count-{{{cols|{{{1|2}}}}}} }}"
     style="{{#if:{{{colwidth|{{{2|}}}}}} |column-width: {{{colwidth|{{{2}}}}}}; |column-count: {{{cols|{{{1|2}}}}}}; }} <!--
         -->{{#if:{{{rules|}}} |{{#ifeq:{{{rules}}}|yes |column-rule: 1px solid #AAA; |column-rule: {{{rules}}}; }} }} <!--
         -->{{#ifeq:{{{small|}}}|yes |font-size:90%;}} <!--
         -->{{#if:{{{style|}}} |{{{style}}} }}"><!--
 -->{{#if:{{{content|}}} |{{{content}}}</div>}}
{{Div col end}} (End div col)
</div>

{{Columns-list}}[edit]

{{div col
 | cols = {{{cols|{{{1|}}}}}}
 | colwidth = {{{colwidth|}}}
 | rules = {{{rules|}}}
 | small = {{{small|}}}
 | style = {{{style|}}}
 | content = {{{2|{{{1|}}}}}}
}}


Can only handle wiki-style table code that uses templates {{(!}} {{!}} {{!!}} {{!-}} {{!)}}[edit]

Col[edit]

{{Col-begin}}
{| class="{{{class|}}} multicol" role="presentation" style="border-collapse: collapse; padding: 0; border: 0; background:{{{bgColor|transparent}}}; width:{{{width|100%}}};"
{{Col-begin-small}}
{| class="{{{class|}}} multicol" style="font-size:90%; border-collapse: collapse; padding: 0; border: 0; background:{{{bgColor|transparent}}}; width:{{{width|100%}}};" role="presentation"
{{Col-break}}
<p></p>
| {{#if:{{{width<includeonly>|</includeonly>}}}|width="{{{width}}}"}} align="{{{align|left}}}" valign="{{{valign|top}}}" {{#if: {{{gap<includeonly>|</includeonly>}}} | style="padding-left:{{{gap}}};" }}|
{{Col-2}}
<p></p>
| style="width:50%; text-align:{{{align|left}}}; vertical-align:{{{valign|top}}};" |
{{Col-3}}
<p></p>
|style="width: 33.33%;" align="{{{align|left}}}" valign="{{{valign|top}}}" |
(etc)

{{Col-end}}
<p></p>
|}
{{End}}
|}


Multicol[edit]

{{Multicol}} (Start multicol)
<includeonly><div><!-- Do not remove this DIV: it prevents the Wiki code from inserting an extra linebreak above this table. -->
{| style="width: {{{1|100%}}}; background-color:transparent;table-layout:fixed; border:none; border-spacing:0;" role="presentation"
|- style="vertical-align: top;"
|<div style="margin-right:{{{2|20px}}};"></includeonly>
{{Multicol-break}}
<includeonly></div>
|<div style="margin-right: {{{1|20px}}};"></includeonly>
{{Multicol-end}}
<includeonly></div>
|}</div></includeonly>


TMB[edit]

{{Top}}
<includeonly><!-- Template:Top begins --->
{| border={{{border|0}}}  width={{{width|100%}}} class="multicol" style="background-color:transparent" role="presentation"
|-
|bgcolor={{{bgColor|{{{bgcolor|<!--"#FFFFE0"-->transparent}}}}}} valign=top width={{{width2|48%}}}|
{|<!-- 
Template:Top ends
--></includeonly>
{{Mid}}
<includeonly>|}<!-- Template:Mid or [[Template:Middle]] -->
| width=1% class="multicol-gutter" |
|bgcolor={{{bgColor|{{{bgcolor|<!--"#FFFFE0"-->transparent}}}}}} valign=top width={{{width2|48%}}}|
{|</includeonly>
{{Bottom}}
<includeonly><!--Template:bottom begins --->{{#if:{{{1|}}}|</div>}}
|}
|}<!--Template:bottom ends---></includeonly>


{{Autocol}}[edit]

(probably)