Template:Infobox: Difference between revisions
No edit summary |
m (→Description) |
||
Line 1: | Line 1: | ||
<noinclude> |
<noinclude> |
||
==Description== |
==Description== |
||
This is a template approach to building infoboxes. There are several sub-templates that are used. |
This is a template approach to building custom infoboxes (e.g. [[Template:Character infobox]]). There are several sub-templates that are used. |
||
* Required Templates to create infobox |
* Required Templates to create infobox |
Revision as of 19:43, 18 February 2024
Description
This is a template approach to building custom infoboxes (e.g. Template:Character infobox). 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}}
![](http://static.miraheze.org/loveanddeepspacewiki/a/a8/10_Days_With_You_banner.png)