Template:NavigationBox/doc

From RationalWiki
Jump to navigation Jump to search

See: documentation on Wikipedia. Yeah... no.

Usage

{{NavigationBox
|Category      =
|Color         =
|Image         =
|List          =
|Title         =
}}

Parameters

Those highlighted in bold are required. The others are rarely used.
  • Category: If included, template will add this category to the page when included. Remember to include the "[[category:" part.
  • Color: Changes the background colour from the default (#ccccff).
  • Image: Adds an image. Include the "[[File:"/"[[Image:" part.
  • List: The list to display.
  • Title: The title of the navbox.

Filling the list

There are a number of ways of doing this.

Manually

First there is the manual way, which involves simply pasting in the list of pages to be displayed, such as:

[[RationalWiki:Bookshelf]] -
[[RationalWiki:Blogroll]] -
[[RationalWiki:Contact points]] -
[[RationalWiki:Ebook citations]] -
[[List of internet kooks]] -
[[List of Poe's Law examples]] -
[[Outside resources]] -
[[RationalWiki:Rational podcasts]] -
[[RationalWiki:Twitterers]] -
[[RationalWiki:Websites]] -
[[RationalWiki:Webpage links]] -
[[RationalWiki:Webshites]] -
[[RationalWiki:Recommended Books]] -
[[RationalWiki:Vlogroll]]

(from {{Rational and irrational media}}.)

The use of <div> tags may be considered to get the formatting right.

Automatic - dpl

Alternatively, you may chose to populate the list automatically from a category. For example:

<dpl>
category = Institute for Creation Research
format = ,²{#ifeq:%NR%|1||-}²&nbsp; [[%PAGE%]] &nbsp;,
</dpl>

(From {{ICRnav}}.)

In this case, instructions are placed within <dpl> tags.

  • Category: Specifies the category to take the pages from.
  • Format: Gives the format the list shold be given in, surrounded by commas.
    • ²{#ifeq:%NR%|1||-}²: Code for "don't put a dash before the first entry".
    • &nbsp;: A "non-breaking spaceWikipedia," important for formatting.
    • [[%PAGE%]]: The format for displaying the link itself. Alternatives include [[%PAGE%|%TITLE]], which has the effect of stripping the namespace prefix from the displayed name.
  • Namespace (not shown above): Specify the namespace(s) to take the pages from. E.g. namespace= (without anything given) will take pages only from mainspace, while namespace=Conservapedia|Fun will take them from there. Leaving this option out will cause the dpl to take pages from all namespaces, which may have undesirable results.

This version of the template will not display the page that it is displayed on in the list it displayed.

Keyword

A more complicated version of the above allows you to specify on a given page how you want it to be displayed on the list. This involves use of the {{keyword}} template. For more information see Template:Evonav (to see it in action), Template:Keyword (to see how to make yours work), and Template:Helpnav (for a guide on how to use it).