PathfinderWiki
Log in

Help:Navboxes

From PathfinderWiki
Help contents
It is assumed that you are already familiar with basic wiki editing and that you know your way around a wiki.
Creating articles

Accessories

Books

Creatures

Deities

Organizations

People

Places

Years

Using templates
InfoboxesNavboxes

Creating redirects

Converting from Wikipedia

Editing articles

Citing sources

Creating an index

Disambiguating subjects

Uploading and adding media

Copyrights

Plagiarism

Permitted media

Categorization

Creating category pages

Accessories

Artwork and media

Books

Creatures

Deities

Inhabitants

Locations

Magic Items

Organizations

Spells

Navboxes are a special class of template that help users navigate groups of related articles, such as a nation's settlements or a creature's different species.

Using navboxes

To add a navbox, first check to see if a relevant navbox already exists in Category:Navboxes.

Once you've found a relevant navbox, you can apply it like any other template.

{{Isger navbox}}

Navboxes automatically identify the current page, if it is linked to from the navbox, by emboldening the navbox text and removing the link. For instance, viewing the Isger navbox from the Dustpawn page will bold and unlink the Dustpawn entry in the navbox.

In navboxes with collapsible groups, you can target the navbox to expand only one of those groups. For example:

{{Isger navbox|settlements}}

will only expand the Settlements group.


For the correct targets, consult the navbox's template page—in this example's case, Template:Isger navbox.

Creating new navbox templates

Navboxes themselves use {{Navbox}} for simple navboxes, and {{Navbox with collapsible groups}} for complex ones. Each template has its own documentation that describes their use more fully; the following example demonstrates how the {{Isger navbox}} above was created.

Because Isger has multiple groups of articles that we want to feature, we'll use {{Navbox with collapsible groups}}.

{{Navbox with collapsible groups
| bodyclass = hlist
| name      = Isger navbox
| title     = [[Isger]], Thrall of [[Cheliax]]
| state     = autocollapse
| selected  = {{{1|}}}
| image     = [[File:Isger symbol.jpg|120px]]

| group1 = Settlements
| abbr1  = settlements
| list1  = 
* [[Elidir]] ''(capital)''
* [[Dustpawn]]
* [[Gillamoor]]
* [[Haugin's Ear]]
* [[Logas]]
* [[Saringallow]]
* [[Umok]]

| group2 = Geographical Features
| abbr2  = geography
| list2  = 
* [[Chitterwood]]
* [[Conerica River]] ([[Grackle River]], [[Skunk River]])
* [[Conerica Straits]]
* [[Isger Pass]]
* [[Keld River]]
* [[Menador Mountains]]
* [[Old Frog Swamp]]

| group3 = Other Places of Interest
| abbr3  = poi
| list3  = 
* [[Citadel Altaerein]]
* [[Citadel Dinyar]]
* [[Finder's Gulch]]
* [[Iron Rose]]
* [[Nesher Mines]]
* [[Wolfpoint]]
}}
<noinclude>
{{Documentation}}
[[Category:Navboxes|Isger navbox]]
</noinclude>

Let's break this down line-by-line.

{{Navbox with collapsible groups

The first line selects the template we'll use.

| bodyclass = hlist

bodyclass sets a style for the entire navbox. The hlist class lets us use regular unordered lists, like this:

* [[Dustpawn]]
* [[Gillamoor]]

in our navbox groups.

| name      = Isger navbox

The name attribute should match the template name. For instance, the name of {{Cheliax navbox}} is Cheliax navbox.

| title     = [[Isger]], Thrall of [[Cheliax]]

The title is what appears in the top of the navbox. No need to add bold formatting to the text—the navbox template does that automatically.

| state     = autocollapse
| selected  = {{{1|}}}

These attributes are optional but preferred. state sets the collapsing behavior of the entire navbox; autocollapse means the entire navbox is expanded when it's the only navbox on the page and collapsed when other navboxes are present. selected enables the navbox targeting described in the Using navboxes section.

| image     = [[File:Isger symbol.jpg|120px]]

Adding an image to a navbox is optional, but a good idea when an image is appropriate. Note that large, and especially tall, images force the navbox to take up enough room to display it.

| group1 = Settlements
| abbr1  = settlements
| list1  = 

This creates our first collapsible group. The group1 attribute sets this group's title as displayed in the navbox. abbr1 is the target; this field is optional but should be added to help editors control the navbox's behavior.

list1 contains this section's body. Because we're using bodyclass = hlist, we can simply use the standard formatting of an unordered list. The hlist class also has the advantage of automatically handling spacing between elements within the list: there is no need to add spaces after list items and dots should be kept on the same line as the preceding element without any extra markup being required.

* [[Elidir]] ''(capital)''
* [[Dustpawn]]
* [[Gillamoor]]
* [[Haugin's Ear]]
* [[Logas]]
* [[Saringallow]]
* [[Umok]]
In some navboxes, you may see something like this instead:

[[Elidir]] ''(capital)'' &middot; [[Dustpawn]] ...

This older approach also works.

For each other group, repeat the process:

| group2 = Geographical Features
...

Make sure each group has a unique abbr attribute.

}}

These closing brackets end the template. They're small but very important!

<noinclude>
{{Documentation}}
[[Category:Navboxes|Isger navbox]]
</noinclude>

This last section uses noinclude tags. Everything inside noinclude tags is omitted when this template is used in an article—it only shows up when you view the navbox template directly.

{{Documentation}} displays the navbox's documentation. When you create a navbox, be sure to note the navbox's sources, explain any special features, and note the group targets to make using this navbox as easy as possible.

Category:Navboxes adds this navbox to Category:Navboxes for other editors to find, and sorts it on that page as "Isger navbox".

That's all there is to it! You can make even simpler navboxes using the same steps and the {{Navbox}} template.