1,970
edits
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
<p>This code | <p>This template uses some small advanced code to generate an infobox template very easily.</p> | ||
==Usage== | ==Usage== | ||
<p>Using this template | <p>Using this template is as simple as defining the fields in the order you want them to appear.</p> | ||
<p>Example:</p> | <p>Example:</p> | ||
{{NewInfoBox | |||
|Align = right | |||
|Border Width = 2px | |||
|Name = Example | |||
|Image Caption = This is an example | |||
|Header1 = This is Header1 | |||
|Title1 = This is Title1 | |||
|Content1 = This is Content1 | |||
|Header2 = This is Header2 | |||
|Title2 = This is Title2 | |||
|Content2 = This is Content2 | |||
|Title3 = This is Title3 | |||
|Content3 = This is Content3 | |||
|Title4 = This is Title4 | |||
|Content4 = This is Content4 | |||
}} | |||
</noinclude> | </noinclude> | ||
<includeonly> | |||
<div style="width:300px;float:{{{Align|right}}};clear:{{{Align|right}}};margin:1em 0 1em 1em;border:{{{Border Width|2px}}} solid {{{Border Color|#336699}}};background:#FFFFFF;-moz-border-radius:15px;border-radius:15px;padding:10px 10px 10px 10px;"> | <div style="width:300px;float:{{{Align|right}}};clear:{{{Align|right}}};margin:1em 0 1em 1em;border:{{{Border Width|2px}}} solid {{{Border Color|#336699}}};background:#FFFFFF;-moz-border-radius:15px;border-radius:15px;padding:10px 10px 10px 10px;"> | ||
{{#if: {{{Header Color|}}}|}} | {{#if: {{{Header Color|}}}|}} | ||
Line 14: | Line 32: | ||
{{ | {{ | ||
#while: | #while: | ||
| {{ #ifexpr: {{ #var: i }} < | | {{ #ifexpr: {{ #var: i }} < 50 | true }} | ||
|<nowiki/> | |<nowiki/> | ||
{{ #if: {{{Header{{ #var: i }}|}}}|{{NewInfoBox/Header|Header{{ #var: i }}|{{{Header Color|#6699CC}}}}}}} | {{ #if: {{{Header{{ #var: i }}|}}}|{{NewInfoBox/Header|{{{Header{{ #var: i }}|}}}|{{{Header Color|#6699CC}}}}}}} | ||
{{#if: {{{Title{{ #var: i }}|}}}|{{NewInfoBox/Field|{{{Title{{ #var: i }}|}}}|{{{Content{{ #var: i }}|}}}|{{{Border Color|#336699}}}}}}} | {{#if: {{{Title{{ #var: i }}|}}}|{{NewInfoBox/Field|{{{Title{{ #var: i }}|}}}|{{{Content{{ #var: i }}|}}}|{{{Border Color|#336699}}}}}}} | ||
{{ #vardefine: i | {{ #expr: {{ #var: i }} + 1 }} }} | {{ #vardefine: i | {{ #expr: {{ #var: i }} + 1 }} }} | ||
}} | }} | ||
</div> | </div> | ||
</includeonly> |