Template:Brazil topic/doc

This template allows for the quick creation of a navigation template for any group of articles which contains the names of the States of Brazil. It uses to create the navigation box.

Mandatory

 * name
 * Mandatory when creating a new template (i.e. Template:Hospitals in Brazil), otherwise the "view· talk· edit" links will connect to Template:Brazil topic. You can enter  for this value as a shortcut.

One of the following combinations is needed to create the links:
 * prefix
 * Places text before the Brazil state name. For example:   would create a title List of airports in Brazil and a body containing state names linked to List of airports in Alagoas, List of airports in Amapá, etc.


 * suffix
 * Places text after the Brazil state name. For example:   would create a title Brazil National Guard and a body containing state names linked to Alagoas National Guard, Amapá National Guard, etc.


 * prefix and suffix
 * Places text before and after the Brazil state name. For example:   and   would create a title List of Brazil rivers and a body containing state names linked to List of Alagoas rivers, List of Amapá rivers, etc.
 * Note: The title in this example should be replaced by using the title parameter described below.

Optional

 * state
 * A navbox with  will start out collapsed if there are two or more tables on the same page that use collapsible . If set to , the navbox will always start out in a collapsed state. If set to blank or anything other than   or  , the navbox will always start out in an expanded state.
 * Default is:.


 * title
 * Text that appears centered in the titlebar (the top bar). This is optional because the use of either prefix, suffix or both will automatically generate a title if the title parameter is not supplied. This parameter is not automatically wiki-linked. For example:   generates the title Rivers in Brazil.


 * navbar *
 * Defaults to . If set to , the v • d • e links on the left side of the titlebar will not be displayed, and padding will be automatically used to keep the title centered.  Use   to remove the v • d • e links, but not apply padding (this is for advanced use only; the "plain" option should suffice for most applications where a navbar is not desired).  Note that it is highly recommended that one does not hide the navbar, in order to make it easier for users to edit the template, and to keep a standard style across pages.

Adding groups and lists
Some templates may require a list of links not already included in the template. These can be specified as follows:


 * above
 * A full-width cell (no group header) displayed above the template's body (between the title and U.S. state links).


 * below
 * A full-width cell (no group header) displayed below the template's body.

Change state name used in link
Links for state use the primary page for that state. The following parameters allow for substitution where the article name does not use the default.


 * AM
 * Replace "Amazonas (Brazilian state)" in links with specified text, i.e. "Amazonas".


 * RJ
 * Replace "Rio de Janeiro (state)" in links with specified text, i.e. "Rio de Janeiro".


 * SP
 * Replace "São Paulo (state)" in links with specified text, i.e. "São Paulo".

Styles

 * titlestyle
 * Specifies CSS values to apply to the title. One use of this is to set the background color of the title:
 * Default is:
 * Default is:
 * Default is:


 * bodystyle
 * Specifies CSS values to apply to the entire template. This will not override the following Navbox default styles:


 * abovestyle
 * belowstyle
 * Specifies CSS values to apply to the cell specified via the above and below parameters. For instance:
 * Default is:
 * Default is:


 * groupstyle
 * Specifies CSS values to apply to the cells specified via the groupn cells. This option overrides any styles that are applied to the entire table. Example:
 * Default is:
 * Default is:


 * liststyle
 * Specifies CSS values to apply to the cells specified via the listn cells. This option overrides any styles that are applied to the entire table. Examples:
 * Default is:
 * Default is:

Excluding display of federal district and minor outlying islands
This example also shows the use of the titlestyle to change the background color and the groupstyle parameters to change the background color and vertical alignment of text.

Adding suffix without leading space
This example also shows the use of the liststyle parameter to add some extra padding around the list, the group1 parameter to remove the "States" heading, and the AC parameter to change link from "Acre (state)" to "Acre".

Adding suffix with leading space
Note the use of an underscore in place of the leading space in the suffix. This is done to accommodate the use of suffixes without a leading space, as in the previous example. A title should be specified to avoid the underscore appearing in the title.

Creating a new template
Code used to create Template:Hospitals in Brazil: Note:   in the above example would be replaced by Hospitals in Brazil when this code is saved in Template:Hospitals in Brazil.

Result:

Templates implemented with Brazil topic

 * 1) Template: Rivers in Brazil