Template:Navbox: Difference between revisions

From NPOWiki
Jump to navigation Jump to search
No edit summary
(added up through 15)
Line 74: Line 74:
       }}<td class="navbox-list">
       }}<td class="navbox-list">
{{{list9}}}
{{{list9}}}
      </td>
    </tr>
}}{{#if:{{{group10|}}}{{{list10|}}}|
    <tr>
      {{#if:{{{group10|}}}|
        <th class="navbox-group">{{{group10}}}</th>
      }}<td class="navbox-list">
{{{list10}}}
      </td>
    </tr>
}}{{#if:{{{group11|}}}{{{list11|}}}|
    <tr>
      {{#if:{{{group11|}}}|
        <th class="navbox-group">{{{group11}}}</th>
      }}<td class="navbox-list">
{{{list11}}}
      </td>
    </tr>
}}{{#if:{{{group12|}}}{{{list12|}}}|
    <tr>
      {{#if:{{{group12|}}}|
        <th class="navbox-group">{{{group12}}}</th>
      }}<td class="navbox-list">
{{{list12}}}
      </td>
    </tr>
}}{{#if:{{{group13|}}}{{{list13|}}}|
    <tr>
      {{#if:{{{group13|}}}|
        <th class="navbox-group">{{{group13}}}</th>
      }}<td class="navbox-list">
{{{list13}}}
      </td>
    </tr>
}}{{#if:{{{group14|}}}{{{list14|}}}|
    <tr>
      {{#if:{{{group14|}}}|
        <th class="navbox-group">{{{group14}}}</th>
      }}<td class="navbox-list">
{{{list14}}}
      </td>
    </tr>
}}{{#if:{{{group15|}}}{{{list15|}}}|
    <tr>
      {{#if:{{{group15|}}}|
        <th class="navbox-group">{{{group15}}}</th>
      }}<td class="navbox-list">
{{{list15}}}
       </td>
       </td>
     </tr>
     </tr>

Revision as of 07:54, 9 July 2021

Documentation [edit]

This template is used to display a box containing various links related to a particular subject. It is meant to be used by other templates that are then used on pages, rather than using this one directly. A list of navboxes can be found here. Navboxes should be placed at the bottom of a page, below everything else.

To create documentation for a navbox implementation, use Template:Navbox/box doc.

Parameters

  • style - (optional) any styling to be applied to the navbox, such as width. Use sparingly; most styling should be in site CSS. This is put directly in the style attribute.
  • state - (optional) use this to change the default state of the navbox - "collapsed" or "expanded". The default is expanded. This parameter should usually be passed through ( |state = {{{state|}}} ) so that the state can be changed on individual pages if necessary.
  • title - the heading of the navbox.
  • group1 through group15 - the heading to use for each group of links. These are all optional; if omitted, the list parameters will be centered in the navbox, which can be useful for particular types of navboxes. Each defined heading requires an accompanying list. You cannot mix rows with and without headings.
  • list1 through list15 - the content for each group. Usually you will want to use {{list}} with the default settings to create a bullet-separated list. You can use lists without headings, but you cannot mix rows with and without headings. At least one list is required.
  • links - (optional) any additional links to display in the navbox footer, before the specific links in parameters below. Usually you will want to use {{list}} with the default settings to create a bullet-separated list consistent with the other links (not necessary if only including one link).
  • portal - (optional) the title of the portal page for this topic (not including "Portal:").
  • category - (optional) the title of the category specific to this topic.
  • template (required) - the title of the navbox template using this template. This is used to create the view/edit link, so it must be correct.
  • nogap (optional) - if multiple navboxes are always used together in succession, use this to remove the spacing between them. Should be placed on any navboxes after the first. The value just needs to be non-empty. See {{Emperors}} for an example.
  • nofooter (optional) - if non-empty, this will hide the footer with links. This should be used very sparingly as it will make the template harder for editors to find.

Skeleton

You can start a navbox template with this general skeleton. You should delete any unused group/link sets. Don't forget to use {{list}} for the list parameters.

{{Navbox
|title = 
|state = {{{state|}}}
|group1 = 
|list1 = 
|group2 = 
|list2 = 
|group3 = 
|list3 = 
|group4 = 
|list4 = 
|group5 = 
|list5 = 
|group6 = 
|list6 = 
|group7 = 
|list7 = 
|group8 = 
|list8 = 
|group9 = 
|list9 = 
|links = 
|portal = 
|category = 
|template = {{subst:PAGENAME}}
}}<noinclude>{{documentation}}</noinclude>

The above documentation is transcluded from Template:Navbox/doc.