Difference between revisions of "Template:Databox"

From LIMSWiki
Jump to navigationJump to search
m (Experimenting.)
m (Experimenting)
Line 1: Line 1:
{{#ifeq:{{{child|}}}|yes||<table class="infobox {{{bodyclass|}}}" cellspacing="5" style="width:22em; {{#if:{{{float|}}}|float: {{{float}}}; clear: {{#ifeq:{{{float|}}}|none|both|{{{float}}}}}; margin: 0 0 1em 1em;}} {{{bodystyle|}}}"><!--
{{#ifeq:{{{child|}}}|yes||<table class="databox {{{bodyclass|}}}" cellspacing="5" style="width:22em; {{#if:{{{float|}}}|float: {{{float}}}; clear: {{#ifeq:{{{float|}}}|none|both|{{{float}}}}}; margin: 0 0 1em 1em;}} {{{bodystyle|}}}"><!--
  Caption
  Caption
-->{{#if:{{{title|}}}|<caption class="{{{titleclass|}}}" style="{{{titlestyle|}}}">{{{title}}}</caption>}}<!--
-->{{#if:{{{title|}}}|<caption class="{{{titleclass|}}}" style="{{{titlestyle|}}}">{{{title}}}</caption>}}<!--
Line 33: Line 33:
  |rowclass={{{imagerowclass2|}}}
  |rowclass={{{imagerowclass2|}}}
}} }}<!--
}} }}<!--
-->{{Databox/row
-->
  |header={{{header1|}}} |headerstyle={{{headerstyle|}}}
  |header={{{header1|}}} |headerstyle={{{headerstyle|}}}
  |label={{{label1|}}}  |labelstyle={{{labelstyle|}}}
  |label={{{label1|}}}  |labelstyle={{{labelstyle|}}}
  |data={{{data1|}}}    |datastyle={{{datastyle|}}}
  |data={{{data1|}}}    |datastyle={{{datastyle|}}}
  |class={{{class1|}}}  |rowclass={{{rowclass1|}}}
  |class={{{class1|}}}  |rowclass={{{rowclass1|}}}
}}{{Databox/row
{{Databox/row
  |header={{{header2|}}} |headerstyle={{{headerstyle|}}}
  |header={{{header2|}}} |headerstyle={{{headerstyle|}}}
  |label={{{label2|}}}  |labelstyle={{{labelstyle|}}}
  |label={{{label2|}}}  |labelstyle={{{labelstyle|}}}

Revision as of 21:10, 9 May 2012

|header= |headerstyle= |label= |labelstyle= |data= |datastyle= |class= |rowclass=
[edit] [purge] Template documentation

Usage

Usage is almost identical to {{infobox}}, but with an additional distinction. While the infobox template hides rows without labels and data, the databox template will only hide a row if it has no label. Rows with a label but no data will still show.

Otherwise, each row on the table can contain either a header, or a label/data pair, or just a data cell.