Template:Infobox: Difference between revisions
(Created page with "* Template:Infobox/start * Template:Infobox/header * Template:Infobox/image * Template:Infobox/section-title * Template:Infobox/info-row-1 * Template:Infobox/info-row-2 * Template:Infobox/footer * Template:Infobox/end") |
No edit summary |
||
Line 1: | Line 1: | ||
<noinclude> |
|||
* [[Template:Infobox/start]] |
|||
==Description== |
|||
* [[Template:Infobox/header]] |
|||
This is a template approach to building infoboxes. There are several sub-templates that are used. |
|||
* [[Template:Infobox/image]] |
|||
* [[Template:Infobox/section-title]] |
|||
* Required Templates to create infobox |
|||
* [[Template:Infobox/info-row-1]] |
|||
* [[Template:Infobox/ |
:* [[Template:Infobox/start]] |
||
* [[Template:Infobox/ |
:* [[Template:Infobox/end]] |
||
* [[Template:Infobox/end]] |
|||
* Infobox Parts |
|||
:* [[Template:Infobox/title]] |
|||
:* [[Template:Infobox/above]] |
|||
:* [[Template:Infobox/image]] |
|||
:* [[Template:Infobox/header]] |
|||
:* [[Template:Infobox/subheader]] |
|||
:* [[Template:Infobox/row-data]] |
|||
:* [[Template:Infobox/below]] |
|||
:* [[Template:Infobox/line]] |
|||
Excluding the row-data template, the naming of the templates follows the structure of the Wikipedia Infobox template, which a visual guide can be found here - [[w:Template:Infobox]]. |
|||
==Usage== |
|||
===Start/End=== |
|||
To use these infobox templates, keep in mind that they must all include the start and end templates to work correctly. The other templates are put between these two. |
|||
<pre> |
|||
{{Infobox/start}} |
|||
...content |
|||
{{Infobox/end}} |
|||
</pre> |
|||
===Title, Above, Header, Subheader, Below, Image=== |
|||
All only take a single argument, which is the content to be displayed. For example, to get title: |
|||
<pre> |
|||
{{Infobox/title|Title text here}} |
|||
</pre> |
|||
Image follows a similar format, but you do need to provide it with the full file link (e.g. <code>[[File:<filename>]]</code>. |
|||
===line=== |
|||
No arguments, simply renders an hr line element when used. |
|||
===row-data=== |
|||
This is where this infobox differs. This template creates a row in the infobox, but also has the ability to split the row up to 4 sections if desired. |
|||
{| class="wikitable" |
|||
! # of Sections || Example Template |
|||
|- |
|||
| 1 section only (Full row) |
|||
| <pre>{{Infobox/row-data|content here}}</pre> |
|||
|- |
|||
| 2 sections (e.g. For the standard label/data row) |
|||
| <pre>{{Infobox/row-data |
|||
|sections=2 |
|||
|left= |
|||
|right= |
|||
}}</pre> |
|||
|- |
|||
| 3 sections (e.g. For next/label/previous rows) |
|||
| <pre>{{Infobox/row-data |
|||
|sections=3 |
|||
|left= |
|||
|mid= |
|||
|right= |
|||
}}</pre> |
|||
|- |
|||
| 4 sections |
|||
| <pre>{{Infobox/row-data |
|||
|sections=4 |
|||
|left= |
|||
|midLeft= |
|||
|midRight= |
|||
|right= |
|||
}}</pre> |
|||
|} |
|||
===Full Example=== |
|||
<pre> |
|||
{{Infobox/start}} |
|||
{{Infobox/title|Sample Infobox}} |
|||
{{Infobox/above|Page name}} |
|||
{{Infobox/subheader|Subheader}} |
|||
{{Infobox/image|[[File:10 Days With You banner.png|link=]]}} |
|||
{{Infobox/line}} |
|||
{{Infobox/header|Sample Header}} |
|||
{{Infobox/row-data|some text here}} |
|||
{{Infobox/row-data |
|||
|sections=2 |
|||
|left='''Label''' |
|||
|right=Data |
|||
}} |
|||
{{Infobox/line}} |
|||
{{Infobox/row-data |
|||
|sections=3 |
|||
|left={{#fas:arrow-left}} Previous |
|||
|mid=Episodes |
|||
|right=Next {{#fas:arrow-right}} |
|||
}} |
|||
{{Infobox/below|The end...}} |
|||
{{Infobox/end}} |
|||
</pre> |
|||
{{Infobox/start}} |
|||
{{Infobox/title|Sample Infobox}} |
|||
{{Infobox/above|Page name}} |
|||
{{Infobox/subheader|Subheader}} |
|||
{{Infobox/image|[[File:10 Days With You banner.png|link=]]}} |
|||
{{Infobox/line}} |
|||
{{Infobox/header|Sample Header}} |
|||
{{Infobox/row-data|some text here}} |
|||
{{Infobox/row-data |
|||
|sections=2 |
|||
|left='''Label''' |
|||
|right=Data |
|||
}} |
|||
{{Infobox/line}} |
|||
{{Infobox/row-data |
|||
|sections=3 |
|||
|left={{#fas:arrow-left}} Previous |
|||
|mid=Episodes |
|||
|right=Next {{#fas:arrow-right}} |
|||
}} |
|||
{{Infobox/below|The end...}} |
|||
{{Infobox/end}} |
|||
</noinclude> |
Revision as of 06:21, 15 February 2024
Description
This is a template approach to building infoboxes. There are several sub-templates that are used.
- Required Templates to create infobox
- Infobox Parts
Excluding the row-data template, the naming of the templates follows the structure of the Wikipedia Infobox template, which a visual guide can be found here - w:Template:Infobox.
Usage
Start/End
To use these infobox templates, keep in mind that they must all include the start and end templates to work correctly. The other templates are put between these two.
{{Infobox/start}} ...content {{Infobox/end}}
Title, Above, Header, Subheader, Below, Image
All only take a single argument, which is the content to be displayed. For example, to get title:
{{Infobox/title|Title text here}}
Image follows a similar format, but you do need to provide it with the full file link (e.g. [[File:<filename>]]
.
line
No arguments, simply renders an hr line element when used.
row-data
This is where this infobox differs. This template creates a row in the infobox, but also has the ability to split the row up to 4 sections if desired.
# of Sections | Example Template |
---|---|
1 section only (Full row) | {{Infobox/row-data|content here}} |
2 sections (e.g. For the standard label/data row) | {{Infobox/row-data |sections=2 |left= |right= }} |
3 sections (e.g. For next/label/previous rows) | {{Infobox/row-data |sections=3 |left= |mid= |right= }} |
4 sections | {{Infobox/row-data |sections=4 |left= |midLeft= |midRight= |right= }} |
Full Example
{{Infobox/start}} {{Infobox/title|Sample Infobox}} {{Infobox/above|Page name}} {{Infobox/subheader|Subheader}} {{Infobox/image|[[File:10 Days With You banner.png|link=]]}} {{Infobox/line}} {{Infobox/header|Sample Header}} {{Infobox/row-data|some text here}} {{Infobox/row-data |sections=2 |left='''Label''' |right=Data }} {{Infobox/line}} {{Infobox/row-data |sections=3 |left={{#fas:arrow-left}} Previous |mid=Episodes |right=Next {{#fas:arrow-right}} }} {{Infobox/below|The end...}} {{Infobox/end}}