A Wiki in the Desert
Log in

Template:InfoboxStacked

From A Wiki in the Desert
Revision as of 21:34, 25 September 2018 by Brad (talk | contribs) (Creating template)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Template documentation (for the above template, sometimes hidden or invisible)

Infoboxes are informational summaries of an article's key points. {{InfoboxStacked}} allows you to create infoboxes that follow a standard appearance and style with minimal markup. Refer to the example to see what the "Stacked" infobox looks like.

Usage

{{InfoboxStacked
| ibname     = 
| ibtype     = 
| image      = 

| ibclass    = 
| ibbgcolor  =
| ibborder   =
| headerbg   =

| paramname1 = 
| param1     = 

| paramname2 = 
| param2     = 

...

}}

All of {{InfoboxStacked}}'s parameters are optional and, except for name, do not appear if not passed or are passed with an empty parameter. Most uses of {{InfoboxStacked}}s should be in templates that pass the necessary parameters to {{InfoboxStacked}}. See the examples below for more details.

Title and type metadata

ibname
The name that appears at the top of the infobox.
Default: {{PAGENAME}}
ibtype
The type of content this infobox summarizes. This is wrapped in parentheses in the rendered infobox.
image
An image link that illustrates the article's subject. This should almost always be 250px wide.

Style attributes

ibclass
The name of a CSS class to associate with the infobox. infobox is always assigned; any classes added here are added to the infobox and do not override this class.
ibbgcolor
A CSS color code for the background of the main portion of the infobox.
Default: #f8f9fa
ibborder
A CSS color code for the border surrounding the infobox.
Default: darkgray
headerbg
A CSS color code for the background of the ibname and ibtype parameters.
Default: #ccc

Parameters

paramnamen
The name of a parameter in the infobox, presented in order from top to bottom in the infobox's body. This text is bolded in the infobox's body. You can include as many paramnamen entries as you wish, but each should be accompanied by a paramn of the same number.
paramn
The content of the associated parameter, typically displayed as plain text below the corresponding paramname in the infobox's body unless noted otherwise above.

Example

Subject template example

You can create an infobox template that itself calls {{InfoboxStacked}}. Indeed, this is the preferred way to use {{InfoboxStacked}}—you can create an infobox that employs a reusable, standard set of parameters for a common subject without needing to use complex wiki code or HTML.

Test of the Obelisk
Test of the Obelisk
(Discipline of Architecture Test)
Level Required

Level 7

Other Requirements
Demonstration

Template:Demonstration

{{Test
| name          = Test of the Obelisk
| discipline    = Architecture
| image         = Architecture Test Icons_Test Obelisk.png
| level         = 3
| requirements  = 
* [[Obelisk Construction]]
* [[Project Management]]
| demonstration = {{Demonstration|demoplayer=Catote|demodate=March 12, 2018}}
}}

The above example is {{Test}}. See that template's documentation for details on its usage. {{Test}} passes its content to {{InfoboxStacked}} through its own defined parameters.

When creating an infobox template using {{InfoboxStacked}}, you can make a parameter always appear by adding a fallback value. For example, to make the discipline parameter above a required or always-appearing parameter, change its param from {{{discipline|}}} to {{{discipline|''required''}}.

Raw infobox example

Example arbitrary infobox
(Example)
First

This text appears first

Second

This text appears second

You can also create arbitrary, one-off infoboxes by directly invoking {{InfoboxStacked}}.

{{InfoboxStacked
| ibname  = Example arbitrary infobox
| ibtype  = Example

| bgcolor = #FFF
| fgcolor = #000

| paramname1 = First
| param1     = This text appears first

| paramname2 = Second
| param2     = This text appears second
}}