Template:Infobox: Difference between revisions

From DisNCord Community Wiki
Jump to navigation Jump to search
(elaborate on usage example)
(add imagecaption parameter)
Line 5: Line 5:
| title = Example Infobox
| title = Example Infobox
| image = Disncord logo 2x.png
| image = Disncord logo 2x.png
| imagecaption = DisNCord Logo
| header1 = Section Header
| header1 = Section Header
| title2 = Title 1
| title2 = Title 1
Line 23: Line 24:
| title = Example Infobox
| title = Example Infobox
| image = Disncord logo 2x.png
| image = Disncord logo 2x.png
| imagecaption = DisNCord Logo
| header1 = Section Header
| header1 = Section Header
| title2 = Title 1
| title2 = Title 1
Line 34: Line 36:
</pre>
</pre>
<br><br>
<br><br>
</noinclude><includeonly><table class="infobox" style="border-spacing: 3px;"><caption class="infobox-title">{{{title|{{PAGENAME}}}}}</caption>{{#if:{{{image|}}}|<tr><td colspan="2" style="text-align: center;">[[File:{{{image}}}|260px|class=infobox-image]]</td></tr>}}<!--
</noinclude><includeonly><table class="infobox" style="border-spacing: 3px;"><caption class="infobox-title">{{{title|{{PAGENAME}}}}}</caption>{{#if:{{{image|}}}|<tr><td colspan="2" style="text-align: center;">[[File:{{{image}}}|260px|class=infobox-image]]{{#if: {{{imagecaption|}}}|<br><span class="infobox-image-caption" style="font-style: italic;">{{{imagecaption}}}</span></td></tr>}}<!--


Row template:
Row template:

Revision as of 09:20, 15 January 2023

Usage example

{{#if:Disncord logo 2x.png|
Example Infobox
Disncord logo 2x.png
DisNCord Logo
Section Header
Title 1Value 1
InfoboxesAre cool!
Section 2 Header
FooBar

Headers are defined by setting the header{n} parameter. Rows are defined by setting the title{n} and value{n}.

The {n} value decides the order of the header/row. You cannot use the same {n} for a header and a row. You must use the same {n} for a title and value for one row.

{{Infobox
| title = Example Infobox
| image = Disncord logo 2x.png
| imagecaption = DisNCord Logo
| header1 = Section Header
| title2 = Title 1
| value2 = Value 1
| title3 = Infoboxes
| value3 = Are cool!
| header4 = Section 2 Header
| title5 = Foo
| value5 = Bar
|}}