Difference between revisions of "Template:ContentBlock"

From Horde3D Wiki
Jump to: navigation, search
m (changing default width to most common case.)
Line 7: Line 7:
 
{{ #if: {{{sub-header|}}} | {{!}} style="background-color: {{{color|#8BC3DF;}}}" width="{{ #expr: {{#var:boxwith}} - {{#var:iconwith}} }}" valign="top" {{!}} {{{sub-header}}} |}}
 
{{ #if: {{{sub-header|}}} | {{!}} style="background-color: {{{color|#8BC3DF;}}}" width="{{ #expr: {{#var:boxwith}} - {{#var:iconwith}} }}" valign="top" {{!}} {{{sub-header}}} |}}
 
|-
 
|-
{{ #if: {{{content|}}} | {{!}} style="background-color: {{{content-color|#FFFFEF;}}}" colspan="2" {{!}} {{#if: {{{center|}}}|<div align="center">|}} {{{content}}} {{#if: {{{center|}}}|</div>|}} |}}
+
{{ #if: {{{content|}}} | {{!}} style="padding: 2px; background-color: {{{content-color|#FFFFEF;}}}" colspan="2" {{!}} {{#if: {{{center|}}}|<div align="center">|}} {{{content}}} {{#if: {{{center|}}}|</div>|}} |}}
 
|-
 
|-
 
{{ #if: {{{description|}}} | {{!}} style="background-color: {{{color|#8BC3DF;}}}" colspan="2" {{!}} {{{description}}} |}}
 
{{ #if: {{{description|}}} | {{!}} style="background-color: {{{color|#8BC3DF;}}}" colspan="2" {{!}} {{{description}}} |}}

Revision as of 16:56, 7 June 2008

ContentBox is a very flexible layout configuration tool. You can use it to render all sorts of content and to layout multiple pages in your articles. It is very configurable: icon, header, sub-header, content, description, border, border thickess, color, content color and size. You can see how such a configurable box can be very easy and flexible to use.

Usage

Here is how you use it and the parameter list: like every other template you include it by using the

{{ContentBox
|content= Content Goes here. (issue, for lists and other items it may be necessary to add the following hack {{!!}}. This is necessary due to weaknesses in the parser, that remove all white space. This is only one of the multiple flaws of the mediawiki parser.
}}

If no parameter apart from content are passed then the template uses a set default parameters.