Template:Navbox right/doc: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
(Created page with "'''{{tl|{{PAGENAME}}}}''' is one of the fundamental building blocks of the wiki. It allows you to very quickly make an navigational box, or navbox, that fits into the overall st...")
 
m (Protected "Template:Navbox right/doc": Robot: Protecting all pages from category templates (‎[edit=sysop] (indefinite) ‎[move=sysop] (indefinite)))
 
(3 intermediate revisions by 2 users not shown)
Line 17: Line 17:
|species=human
|species=human
}}
}}
<--For the purposes of this demonstration, the following full code is used here, because {{POTUS}} doesn't exist.  If {{POTUS}} did exist, then this would be called by simply typing  
<!--For the purposes of this demonstration, the following full code is used here, because {{POTUS}} doesn't exist.  If {{POTUS}} did exist, then this would be called by simply typing  


{{Infobox Individual
{{Infobox Individual
Line 30: Line 30:
{{Navbox right|Presidents of the United States|[[George Washington]], [[Abraham Lincoln]], [[Herbert Hoover]], [[Richard Nixon]], [[Bill Clinton]], [[Barack Obama]]}}
{{Navbox right|Presidents of the United States|[[George Washington]], [[Abraham Lincoln]], [[Herbert Hoover]], [[Richard Nixon]], [[Bill Clinton]], [[Barack Obama]]}}
What do you get by using this approach to creating a navbox?  Something that works right out of the box.  No fiddling with code, no experimenting with colours, no sizing ''this'' margin or that ''padding' setting.  It'll fit right under any pre-existing infoboxes and look like it ''belongs'' on the page.  '''It just ''works'''''
What do you get by using this approach to creating a navbox?  Something that works right out of the box.  No fiddling with code, no experimenting with colours, no sizing ''this'' margin or that ''padding' setting.  It'll fit right under any pre-existing infoboxes and look like it ''belongs'' on the page.  '''It just ''works'''''
==Proper usage==
Generally speaking, navboxes that are in this position are discouraged.  You are generally recommended to use {{tl|navbox}} for a bottom-of-page navbox. We don't want all navigation happening in a 260px wide column on the right of the page! 
However, there are a few points of navigation which are better done underneath a navbox. Generally, such cases are things with a small list that doesn't change often and can be compacted down to a few number of characters.  Examples include {{tl|doctors}}, {{tl|romanas}}, {{tl|K9s}} and {{tl|looks like}}.
'''If your navbox is more than 50% as tall as the infobox on the page, you should be using {{tl|navbox}} instead.''' 
Also, this template should ''never'' be directly used on a page in the main [[namespace]].  You should always create another template which then ''calls'' this template.  See, for instance, the code at {{tl|looks like}}.
==Limitations==
This navbox only allows for two rows: the title, and the list.  More ''could'' be added, but more ''won't'' be added.  This template is for very simple lists only.
<noinclude>[[category:template documentation|{{PAGENAME}}]]</noinclude>

Latest revision as of 02:05, 13 May 2013

{{Navbox right/doc}} is one of the fundamental building blocks of the wiki. It allows you to very quickly make an navigational box, or navbox, that fits into the overall style of the rest of the wiki.

Usage

  1. Begin a new template page
  2. Insert the following
    <includeonly>{{Navbox right|<title>|<list>}}</includeonly><noinclude><noinclude>{{documentation}}[[Category:Navigation templates]]</noinclude>
  3. Substitute the title at <title> and the list of things at <list>
  4. Publish!

Example

Let's imagine there's a need for a new navbox that lists the various US presidents seen in the DWU. There's not, but let's imagine it.

We'd begin by creating a page called Template:POTUS. On that brand new page we'd enter the following code:

<includeonly>{{Navbox right|Presidents of the United States|[[George Washington]], [[Abraham Lincoln]], [[Herbert Hoover]], [[Richard Nixon]], [[Bill Clinton]], [[Barack Obama]]}}</includeonly><noinclude><noinclude>{{documentation}}[[Category:Navigation templates]]</noinclude>

It's really very easy. Just {{navbox right|<name of navbox>|<list of things in the navbox>}}

Display

What do you get by using this approach to creating a navbox? Something that works right out of the box. No fiddling with code, no experimenting with colours, no sizing this margin or that padding' setting. It'll fit right under any pre-existing infoboxes and look like it belongs on the page. It just works

Proper usage

Generally speaking, navboxes that are in this position are discouraged. You are generally recommended to use {{navbox}} for a bottom-of-page navbox. We don't want all navigation happening in a 260px wide column on the right of the page!

However, there are a few points of navigation which are better done underneath a navbox. Generally, such cases are things with a small list that doesn't change often and can be compacted down to a few number of characters. Examples include {{doctors}}, {{romanas}}, {{K9s}} and {{looks like}}.

If your navbox is more than 50% as tall as the infobox on the page, you should be using {{navbox}} instead.

Also, this template should never be directly used on a page in the main namespace. You should always create another template which then calls this template. See, for instance, the code at {{looks like}}.

Limitations

This navbox only allows for two rows: the title, and the list. More could be added, but more won't be added. This template is for very simple lists only.