Misplaced Pages

Template:NavigationBox: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 19:32, 25 May 2006 editGoldRingChip (talk | contribs)Administrators135,431 edits test to correct my error← Previous edit Revision as of 00:15, 26 May 2006 edit undoGennaro Prota (talk | contribs)Extended confirmed users3,192 edits overall revision: removed test code by Markles, improved documentation and presentation of examples; made the page relocatable; added category "Templates using ParserFunctions"Next edit →
Line 2: Line 2:
{| summary="Navigation box - {{{Summary|No summary provided}}}" class="toccolours" style="clear: both; width: 94%; margin: 0.5em auto; text-align: center; padding: 0em 0em 0em 0em" {| summary="Navigation box - {{{Summary|No summary provided}}}" class="toccolours" style="clear: both; width: 94%; margin: 0.5em auto; text-align: center; padding: 0em 0em 0em 0em"
! style="padding-top: 0.2em; padding-bottom: 0.2em; {{ #if: {{{Color|}}} | background: {{{Color}}} | background: #ccccff }}" | {{{Title}}} ! style="padding-top: 0.2em; padding-bottom: 0.2em; {{ #if: {{{Color|}}} | background: {{{Color}}} | background: #ccccff }}" | {{{Title}}}
{{#if: {{{Image|<!--<noinclude>-</noinclude>-->}}} | <td style="vertical-align: middle; width: 1px" rowspan="2"> {{{Image}}} </td> }} {{#if: {{{Image|<noinclude>-</noinclude>}}} | <td style="vertical-align: middle; width: 1px" rowspan="2"> {{{Image}}} </td> }}
|- |-
| style="font-size: 90%; padding: 0.5em 1em" | {{{List}}} | style="font-size: 90%; padding: 0.5em 1em" | {{{List}}}
|}{{{Category|}}}<noinclude> |}{{{Category|}}}<noinclude>



==Purpose== ==Purpose==
This is a ]. It helps to construct a standardized box containing a list of links to articles which relates to the one being read, plus an optional image.
Creating various kinds of navigation boxes. Common examples are footers with lists of Government officials and Heads of State.


==Use== ==Use==
To apply this template you can start by copy-and-pasting the following code and then provide adequate arguments:
The template has the following parameters: <code>Title</code>, <code>Color</code>, <code>Image</code>, <code>List</code>, <code>Category</code>, <code>Summary</code>.


To use it you can start by copy-and-pasting the following code:
<pre>{{NavigationBox <pre>{{NavigationBox
| Title = | Title =
Line 23: Line 23:
}}</pre> }}</pre>


===Mandatory arguments===
The only mandatory arguments are those for the <code>Title</code> and <code>List<code> parameters. Also, usage of the <code>Summary</code> parameter is ''recommended'', for the benefit of vocal and Braille-based user agents: it should provide a brief textual description of the box contents; ''ordinary quotation marks around or within the provided text are not allowed;'' in case you need quoting you may use the curly variants:<code>“</code> and <code>”</code>.
*Title: A title for the navigation box; may include links
*List: List of links to related articles; links maybe separated, for instance, by commas, bullets, or pipe symbols.


===Recommended arguments===
The default for <code>Color</code> is showed in the {{{Title}}} row above.
*Summary: this parameter is aimed at vocal and Braille-based user agents and should give a brief textual description of the box contents; ''ordinary quotation marks around or within the provided text are not allowed;'' if quoting is needed you may use curly quotes: <code>“</code> and <code>”</code>.


===Default values===
==Examples==
The Color parameter defaults to the color showed in the {{{Title}}} row above.<!-- note: do not add the color code explicitly here; someone could modify it in the template code only, making this docs outdated-->

===Examples===


;Example 1 ;Example 1
The following code:<br><br> The following code:

<nowiki>{{NavigationBox</nowiki><br><nowiki>| Title = The first 25 Presidents of the United States </nowiki><br><nowiki>| Image = ]</nowiki><br><nowiki>| Color = </nowiki><br><nowiki>| Category = </nowiki><br><nowiki>| List = ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ] </nowiki><br><nowiki>| Summary = A list of the first 25 US Presidents</nowiki><br><nowiki>}}</nowiki>
<div style="margin-left: 3%">
<nowiki>&#123;&#123;</nowiki>{{PAGENAME}} <br /><nowiki>
| Title = The first 25 Presidents of the United States </nowiki><br /><nowiki>
| Image = ] </nowiki><br /><nowiki>
| Summary = A list of the first 25 US Presidents </nowiki><br /><nowiki>
| Color = </nowiki><br /><nowiki>
| Category = </nowiki><br /><nowiki>
| List = ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]&amp;nbsp;• ]</nowiki><br /><nowiki>
}}</nowiki>
</div>



yields: yields:


{{ {{PAGENAME}}
{{NavigationBox
| Title= The first 25 Presidents of the United States | Title = The first 25 Presidents of the United States
| Image = ] | Image = ]
| Summary = A list of the first 25 US Presidents
| Category=
| Color =
| List = ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]
| Category =
| Summary = A list of the first 25 US Presidents }}
| List = ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]
}}


;Example 2 ;Example 2
Removing the <code>Image</code> argument and providing <code>Color=teal</code> yields: Removing the <code>Image</code> argument and providing <code>Color= teal</code> the result changes to:


{{ {{PAGENAME}}
{{NavigationBox
| Title= The first 25 Presidents of the United States | Title = The first 25 Presidents of the United States
| Color=teal | Image =
| Category=
| List = ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]
| Summary = A list of the first 25 US Presidents | Summary = A list of the first 25 US Presidents
| Color = teal
| Category =
| List = ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]
}} }}


Line 57: Line 77:
*] *]


] ]
]</noinclude>
</noinclude>

Revision as of 00:15, 26 May 2006

This template employs intricate features of template syntax. You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages.
You can conduct experiments, and should test all major changes, in either this template's sandbox, the general template sandbox, or your user space before changing anything here.
{{{Title}}} {{{Image}}}
{{{List}}}


Purpose

This is a navigational template. It helps to construct a standardized box containing a list of links to articles which relates to the one being read, plus an optional image.

Use

To apply this template you can start by copy-and-pasting the following code and then provide adequate arguments:

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

Mandatory arguments

  • Title: A title for the navigation box; may include links
  • List: List of links to related articles; links maybe separated, for instance, by commas, bullets, or pipe symbols.

Recommended arguments

  • Summary: this parameter is aimed at vocal and Braille-based user agents and should give a brief textual description of the box contents; ordinary quotation marks around or within the provided text are not allowed; if quoting is needed you may use curly quotes: and .

Default values

The Color parameter defaults to the color showed in the {{{Title}}} row above.

Examples

Example 1

The following code:

{{NavigationBox
| Title = The first 25 Presidents of the United States
| Image = ]
| Summary = A list of the first 25 US Presidents
| Color =
| Category =
| List = ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]&nbsp;• ]
}}


yields:


The first 25 Presidents of the United States U.S. presidential seal
Washington • J Adams • Jefferson • Madison • Monroe • JQ Adams • Jackson • Van Buren • W Harrison • Tyler • Polk • Taylor • Fillmore • Pierce • Buchanan • Lincoln • A Johnson • Grant • Hayes • Garfield • Arthur • Cleveland • B Harrison • Cleveland • McKinley
Example 2

Removing the Image argument and providing Color= teal the result changes to:


The first 25 Presidents of the United States
Washington • J Adams • Jefferson • Madison • Monroe • JQ Adams • Jackson • Van Buren • W Harrison • Tyler • Polk • Taylor • Fillmore • Pierce • Buchanan • Lincoln • A Johnson • Grant • Hayes • Garfield • Arthur • Cleveland • B Harrison • Cleveland • McKinley

See also

Categories: