Template:Infobox/row: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Caesar Schinas
m (Ah; I think the second problem was in my original code)
imported>Caesar Schinas
m (Good; found the problem. Re-adding Chris's (approx) comments)
Line 1: Line 1:
{{#ifeq:{{{data|}}}|---|
{{#ifeq:{{{data|}}}|---| <!-- If the data field contains three hyphens, "---", then show a full-width header... -->
! colspan="2" style="text-align:center; font-weight:bold; {{{labelstyle|}}}" {{!}} {{{label}}}
! colspan="2" style="text-align:center; font-weight:bold; {{{labelstyle|}}}" {{!}} {{{label}}}
|<!--else-->
|<!-- ...else... -->
{{#if:{{{data|}}}|
{{#if:{{{data|}}}|
{{#if:{{{label|}}}|
{{#if:{{{label|}}}| <!-- ...if the data field AND the label field are both set, show both... -->
! {{#if:{{{labelstyle|}}} | style="{{{labelstyle}}}" {{!}} }} {{{label}}}
! {{#if:{{{labelstyle|}}} | style="{{{labelstyle}}}" {{!}} }} {{{label}}}
{{!}} {{#if:{{{datastyle|}}} | style="{{{datastyle}}}" {{!}} }} {{{data}}}
{{!}} {{#if:{{{datastyle|}}} | style="{{{datastyle}}}" {{!}} }} {{{data}}}
|<!--else-->
|<!-- ...else, if just the data field is set, show it full-width... -->
{{!}} colspan="2" {{#if:{{{datastyle|}}} | style="{{{datastyle}}}" }} {{!}} {{{data}}}
{{!}} colspan="2" {{#if:{{{datastyle|}}} | style="{{{datastyle}}}" }} {{!}} {{{data}}}
}}
}}
}}
}}
}}
}}

Revision as of 17:17, 24 April 2009