Difference between revisions of "Template:Databox"

From LIMSWiki
Jump to navigationJump to search
(Updated code.)
m (Experimenting.)
Line 1: Line 1:
{{#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|}}}"><!--
{{#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|}}}"><!--
  Caption
  Caption
-->{{#if:{{{title|}}}|<caption class="{{{titleclass|}}}" style="{{{titlestyle|}}}">{{{title}}}</caption>}}<!--
-->{{#if:{{{title|}}}|<caption class="{{{titleclass|}}}" style="{{{titlestyle|}}}">{{{title}}}</caption>}}<!--

Revision as of 21:07, 9 May 2012

[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.