Anonymous
×
Create a new article
Write your page title here:
We currently have 57 articles on Vultroverse Wiki. Type your article name above or click on one of the titles below and start writing!



Template:NewInfoBox: Difference between revisions

No edit summary
No edit summary
Line 1: Line 1:
<noinclude>
<noinclude>
<p>This code is unfinished. The template will not work yet. Currently waiting for Extension:Variables to be installed.</p>
<p>This template uses some small advanced code to generate an infobox template very easily.</p>
<p>When finished, this code will allow for the generation of a new infobox with unlimited customization.</p>
==Usage==
==Usage==
<p>Using this template will be as simple as defining the fields in number order</p>
<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 }} < 100 | true }}
   | {{ #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>

Revision as of 15:32, 30 July 2012

This template uses some small advanced code to generate an infobox template very easily.

Usage

Using this template is as simple as defining the fields in the order you want them to appear.

Example:


Example
This is an example

This is Header1
This is Title1
This is Content1
This is Header2
This is Title2
This is Content2
This is Title3
This is Content3
This is Title4
This is Content4