Template:Infobox/Base

From StarfinderWiki
Template documentation (for the above template, sometimes hidden or invisible)
Subpages of this template:

Infoboxes are informational summaries of an article's key points. {{Infobox/Base}} allows you to create infoboxes that follow a standard appearance and style with minimal markup. This template is not meant to be used directly, but instead be used by more specific infobox templates.

Usage

{{Infobox/Base
| ibname     = 
| ibtype     = 
| traits     = 
| image      = 
| imagebgcolor = 
| website    = 
| pubcode    = 

| ibclass    = 
| bgcolor    = 
| fgcolor    = 

| paramname1 = 
| param1     = 
...

| source      = {{{source|}}}
| page        = {{{page|}}}
| footnote    = {{{footnote|}}}
}}

All of {{Infobox/Base}}'s parameters are optional, and except for name do not appear if not passed or are passed with an empty parameter. Most uses of {{Infobox/Base}}es should be in templates that pass the necessary parameters to {{Infobox/Base}}. 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. Should be given without [[]] or any settings.
website
A link associated with the article. This typically appears beneath the image.
pubcode
The stock code associated with a product. This typically replaces the default text of the website link.

Style attributes

imagebgcolor
A CSS color code for the background of the image parameter.
Default: #FFF
ibclass
The name of a CSS class to associate with the infobox. tantable and infobox are always assigned; any classes added here are added to the infobox and do not override these classes.
bgcolor
A CSS color code for the background of the ibname and ibtype parameters.
Default: #000
fgcolor
A CSS color code for the text of the ibname and ibtype parameters.
Default: #FFF

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 left column of 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.
Certain paramnames have special properties:
artworkby, imagesof, gallery, worksby: Links the param to a category, either :Category:Artwork by param for artwork by creator, :Category:Images of param for artwork categorized by subject, :Category:Artwork from param for artwork categorized by source, or :Category:Works by param for published works by creator, respectively. Only the param is displayed, only one of these two options should be used, and only one instance of it should be used per infobox.
Default, if no param is provided: {{PAGENAME}}
custom: Renders arbitrary wikitext instead of a key/value pair. The same optional customclass and customstyle values are applied to all custom parameter containers.
isbn, ISBN, isbne, ISBNE: Precedes the content with "ISBN", triggering special handling of a valid ISBN param.
regionmap: An image with no preceding text, designed to display a regional map for a location. Only the regionmap's param content is displayed.
source: Italicized source spanning the infobox body, preceded by a horizontal line and "Source:" and suffixed by a page number if the page parameter is provided. Only the source's param content is displayed, only one source should be used per infobox, and the source should be the last paramname/param in the infobox.
paramn
The content of the associated parameter, typically displayed as plain text in the right column of the infobox's body unless noted otherwise above.
page
A page number for a provided source paramnamen. page only appears if there is a source.
footnote
An additional footnote for the bottom of the infobox. A common use case for the footnote parameter is to denote information that differs between multiple books about the subject. For example, dhampir creatures have the common trait in Monster Core, but dhampir player characters have the Template:2eTrait trait in Player Core 2. Changes that occurred in the Pathfinder Remaster project might label legacy content as follows: "Legacy 2E: In Core Rulebook 409, awaken animal additionally had the Template:2eTrait trait."
1E,2E
If present this will create a tabbed 1E/2E section in the infobox.
aon1e,aon2e
Can contain a link to an Archive of Nethys page, starting after the first slash (e.g. Monsters.aspx?ID=490)

Example

Subject template example

You can create an infobox template that itself calls {{Infobox/Base}}. Indeed, this is the preferred way to use {{Infobox/Base}}—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.

Infobox/Base
(City)

{{Infobox
| ibname     = {{{name|}}}
| ibtype     = City
| image      = {{{image|}}}

| bgcolor    = #363
| fgcolor    = #fff

| paramname1 = Titles
| param1     = {{{titles|}}}

| paramname2 = Nation
| param2     = {{{nation|}}}

| paramname3 = Region
| param3     = {{{region|}}}

| paramname4 = Size
| param4     = {{{size|}}}

| paramname5 = Population
| param5     = {{{population|}}}

| paramname6 = Demographics
| param6     = {{{demographics|}}}

| paramname7 = Government
| param7     = {{{government|}}}

| paramname8 = Alignment
| param8     = {{{alignment|}}}

| paramname9 = Demonym
| param9     = {{{natives|}}}

| paramname10 = Adjective
| param10     = {{{adjective|}}}

| paramname11 = Ruler
| param11     = {{{ruler|}}}

| paramname12 = Leader
| param12     = {{{leader|}}}

| paramname13 = regionmap
| param13     = {{{regionmap|}}}

| paramname14 = source
| param14     = {{{source|}}}
| page        = {{{page|}}}
}}

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

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

Raw infobox example

Example arbitrary infobox
(Example)

First
This text appears first
Second
This text appears second
Source: Core Rulebook, pg(s). 1
footnote

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

{{Infobox/Base
| ibname  = Example arbitrary infobox
| ibtype  = Example

| bgcolor = #FFF
| fgcolor = #000

| paramname1 = First
| param1     = This text appears first

| paramname2 = Second
| param2     = This text appears second

| paramname3 = artworkby
| param3     = Wayne Reynolds

| paramname4 = custom
| param4     = [https://google.com Google link]
| customclass = plainlinks
| customstyle = font-size: 0.8em; text-style: italic; text-align: center;

| paramname5 = source
| param5     = [[Core Rulebook]]
| page       = 1

| paramname6 = footnote
| param6     = footnote
}}