.

Template:NavigationBox/doc: Difference between revisions

Wikicars, a place to share your automotive knowledge
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude>
<includeonly>
{{mergefrom|Navigation no hide}}{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude>
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
<code>{&#123;[[Template:{{PAGENAME}}|{{PAGENAME}}]]&#125;}</code> is a generic [[Wikipedia:Navigational templates|navigational template]].


=== Usage ===
{{Commonstmp|NavigationBox}}
----
This is a [[Wikipedia:Navigational templates|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.
To apply this template, you can start by copy-and-pasting the following code and then provide arguments:


==== Blank ====
==Blank==
<pre>{{Navigation
<pre>{{NavigationBox
| name  = {{subst:PAGENAME}}
| Name = {{subst:PAGENAME}}
| title =  
| Title =  
| body =  
| Image =
}}
| List =
</pre>
| Category =
  | Summary =  
}}</pre>
 
== Parameters ==
===''Mandatory''===
; Name : Name of the template, include for future use when Tnavbar functionality is added.
 
; Title : Text that appears centered in the titlebar (the top bar). Usually this is the template's topic, i.e. a succinct description of the body contents.
 
; List: Contents of the navigation box. Use <nowiki>&amp;#124;</nowiki> to separate links. It is not possible to include a pipe ("|") in the contents as this symbol is used to separate parameters.
 
===''Optional''===
; Color : Header color. Default is <span style="background-color: #ccf;">#ccf</span>. Use of this parameter is discouraged. Where it is used, care and consensus are needed as multiple navigational templates on one page with different titlebar colors will probably look unpleasant.


==== Parameters ====
; Image : The image. Must include <code><nowiki>[[Image:...|?px|alt text]]</nowiki></code>
----


===== ''Mandatory'' =====
; 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>.
; name  : (or "templateName") The name of the template, which is needed for the "view{{·}} talk{{·}} edit" links to work properly on all of the pages where the template is used on. You can enter <code><nowiki>{{subst:PAGENAME}}</nowiki></code> for this value as a shortcut.
; title : (or "header") Text that appears centered in the titlebar (the top bar). Usually this is the template's topic, i.e. a succinct description of the ''body'' parameter's contents.
; body  : The material contained by the template, usually a list or list of links. Format is inline.


===== ''Optional'' =====
==Examples==
; color : Background color of the titlebar. NB Care/consensus needed when using this parameter as multiple navigational templates on one page using different titlebar colors is likely to look unpleasant.
===Example 1===
; cat  : (or "category") The category or categories to which a page sporting the template will become a member.
The following code:
<!--; state : Defaults to <code>autocollapse</code>. If set to <code>collapsed</code>, the navbox will always start out in a collapsed state.-->


=== Example ===
<div style="margin-left: 3%">
----
<nowiki>&#123;&#123;</nowiki>NavigationBox <br /><nowiki>
| Name = US Presidents </nowiki><br /><nowiki>
| Title = The first 25 Presidents of the United States </nowiki><br /><nowiki>
| Image = [[Image:USPresidentialSeal.jpg|60px|U.S. presidential seal]] </nowiki><br /><nowiki>
| Summary = A list of the first 25 US Presidents </nowiki><br /><nowiki>
| Color = </nowiki><br /><nowiki>
| Category = </nowiki><br /><nowiki>
| List = [[George Washington|Washington]]&amp;nbsp;• [[John Adams|J&amp;nbsp;Adams]]&amp;nbsp;• [[Thomas Jefferson|Jefferson]]&amp;nbsp;• [[James Madison|Madison]]&amp;nbsp;• [[James Monroe|Monroe]]&amp;nbsp;• [[John Quincy Adams|JQ&amp;nbsp;Adams]]&amp;nbsp;• [[Andrew Jackson|Jackson]]&amp;nbsp;• [[Martin Van Buren|Van&amp;nbsp;Buren]]&amp;nbsp;• [[William Henry Harrison|W&amp;nbsp;Harrison]]&amp;nbsp;• [[John Tyler|Tyler]]&amp;nbsp;• [[James K. Polk|Polk]]&amp;nbsp;• [[Zachary Taylor|Taylor]]&amp;nbsp;• [[Millard Fillmore|Fillmore]]&amp;nbsp;• [[Franklin Pierce|Pierce]]&amp;nbsp;• [[James Buchanan|Buchanan]]&amp;nbsp;• [[Abraham Lincoln|Lincoln]]&amp;nbsp;• [[Andrew Johnson|A&amp;nbsp;Johnson]]&amp;nbsp;• [[Ulysses S. Grant|Grant]]&amp;nbsp;• [[Rutherford B. Hayes|Hayes]]&amp;nbsp;• [[James Garfield|Garfield]]&amp;nbsp;• [[Chester A. Arthur|Arthur]]&amp;nbsp;• [[Grover Cleveland|Cleveland]]&amp;nbsp;• [[Benjamin Harrison|B&amp;nbsp;Harrison]]&amp;nbsp;• [[Grover Cleveland|Cleveland]]&amp;nbsp;• [[William McKinley|McKinley]]</nowiki><br /><nowiki>
}}</nowiki>
</div>


==== Code ====
yields:
<pre>{{Navigation
{{NavigationBox
| name  = {{subst:PAGENAME}}
| Title = The first 25 Presidents of the United States
| title = [[Countries of the world|Countries]] of [[Central Asia]]
| Image = [[Image:USPresidentialSeal.jpg|60px|U.S. presidential seal]]
| cat  = [[Category:Central Asian countries]]<noinclude>[[Category:Asian navigational boxes| {{PAGENAME}}]] [[Category:Continental navigation templates|{{PAGENAME}}]]</noinclude>
| Summary = A list of the first 25 US Presidents
| body  =
| Color =
[[Afghanistan]]{{·}}
| Category =
[[Kazakhstan]]{{·}}
| List = [[George Washington|Washington]]&nbsp;• [[John Adams|J&nbsp;Adams]]&nbsp;• [[Thomas Jefferson|Jefferson]]&nbsp;• [[James Madison|Madison]]&nbsp;• [[James Monroe|Monroe]]&nbsp;• [[John Quincy Adams|JQ&nbsp;Adams]]&nbsp;• [[Andrew Jackson|Jackson]]&nbsp;• [[Martin Van Buren|Van&nbsp;Buren]]&nbsp;• [[William Henry Harrison|W&nbsp;Harrison]]&nbsp;• [[John Tyler|Tyler]]&nbsp;• [[James K. Polk|Polk]]&nbsp;• [[Zachary Taylor|Taylor]]&nbsp;• [[Millard Fillmore|Fillmore]]&nbsp;• [[Franklin Pierce|Pierce]]&nbsp;• [[James Buchanan|Buchanan]]&nbsp;• [[Abraham Lincoln|Lincoln]]&nbsp;• [[Andrew Johnson|A&nbsp;Johnson]]&nbsp;• [[Ulysses S. Grant|Grant]]&nbsp;• [[Rutherford B. Hayes|Hayes]]&nbsp;• [[James Garfield|Garfield]]&nbsp;• [[Chester A. Arthur|Arthur]]&nbsp;• [[Grover Cleveland|Cleveland]]&nbsp;• [[Benjamin Harrison|B&nbsp;Harrison]]&nbsp;• [[Grover Cleveland|Cleveland]]&nbsp;• [[William McKinley|McKinley]]
[[Kyrgyzstan]]{{·}}
[[Mongolia]]{{·}}
[[Russia]]{{·}}
[[Tajikistan]]{{·}}
[[Turkmenistan]]{{·}}
[[Uzbekistan]]
}}
}}
</pre>


==== Result ====
===Example 2===
{{msg:{{BASEPAGENAME}}
Removing the <code>Image</code> argument and providing <code>Color= teal</code> the result changes to:
| name  = Countries of Central Asia
{{NavigationBox
| title = [[Countries of the world|Countries]] of [[Central Asia]]
| Title = The first 25 Presidents of the United States
| body  =
| Image =
[[Afghanistan]]{{·}}
| Summary = A list of the first 25 US Presidents
[[Kazakhstan]]{{·}}
| Color = teal
[[Kyrgyzstan]]{{·}}
| Category =
[[Mongolia]]{{·}}
| List = [[George Washington|Washington]]&nbsp;• [[John Adams|J&nbsp;Adams]]&nbsp;• [[Thomas Jefferson|Jefferson]]&nbsp;• [[James Madison|Madison]]&nbsp;• [[James Monroe|Monroe]]&nbsp;• [[John Quincy Adams|JQ&nbsp;Adams]]&nbsp;• [[Andrew Jackson|Jackson]]&nbsp;• [[Martin Van Buren|Van&nbsp;Buren]]&nbsp;• [[William Henry Harrison|W&nbsp;Harrison]]&nbsp;• [[John Tyler|Tyler]]&nbsp;• [[James K. Polk|Polk]]&nbsp;• [[Zachary Taylor|Taylor]]&nbsp;• [[Millard Fillmore|Fillmore]]&nbsp;• [[Franklin Pierce|Pierce]]&nbsp;• [[James Buchanan|Buchanan]]&nbsp;• [[Abraham Lincoln|Lincoln]]&nbsp;• [[Andrew Johnson|A&nbsp;Johnson]]&nbsp;• [[Ulysses S. Grant|Grant]]&nbsp;• [[Rutherford B. Hayes|Hayes]]&nbsp;• [[James Garfield|Garfield]]&nbsp;• [[Chester A. Arthur|Arthur]]&nbsp;• [[Grover Cleveland|Cleveland]]&nbsp;• [[Benjamin Harrison|B&nbsp;Harrison]]&nbsp;• [[Grover Cleveland|Cleveland]]&nbsp;• [[William McKinley|McKinley]]
[[Russia]]{{·}}
[[Tajikistan]]{{·}}
[[Turkmenistan]]{{·}}
[[Uzbekistan]]
}}
}}


=== See also ===
==See also==
----
{{Navigational templates}}
;{{lts|{{BASEPAGENAME}}}}<!--self-listing for quick access on edit history-->
 
:Navigationbox with v-d-e and hide/show.
;{{lts|Navigation with image}}
:Navigationbox with v-d-e, hide/show and optional image.
;{{lts|Navbox generic}}
:Navigationbox containing several lists.
;{{lts|NavigationBox}}
:Navigationbox with image on the right; no v-d-e nor hide/show.<br/><small>(Image breaks titlebar; template deprecated? [[User:David Kernow|David Kernow]] <span style="font-size:90%;">[[User talk:David Kernow|(talk)]]</span> 02:23, 29 November 2006 (UTC))</small>
;{{lts|Dynamic navigation box}}
:Navigationbox with hide/show. Allows width to be specified (but that can lead to visual inconsistency).
;{{lts|Dynamic navigation box with image}}
:Navigationbox with image on the left and hide/show, but no v-d-e.
<includeonly>
<includeonly>
<!-- ADD CATEGORIES BELOW THIS LINE -->
[[Category:Navigational templates| {{PAGENAME}}]]
[[Category:Templates using ParserFunctions|{{PAGENAME}}]]
<!-- ADD INTERWIKIS BELOW THIS LINE -->


<!--Categories-->
[[Category:Navigational templates| ]]


<!--Other languages-->
[[fr:Modèle:Navigation]]
[[he:תבנית:ניווט]]
[[ko:틀:안내]]
[[ro:Format:Navigation Template]]
[[tr:Şablon:Dolaşım]]
</includeonly>
</includeonly>
[[Category:Templates]]
[[Category:Templates]]

Revision as of 02:27, 12 January 2007

Template:Template doc page viewed directly


The {{#if:|{{{2}}}|sister project}} {{#if:|{{{2}}}|Commons}} has this template: {{#ifeq: Wikicars|Commons|NavigationBox/doc|NavigationBox/doc}} {{#if: |}} {{#if: |}}

{{#ifeq:NavigationBox/doc|Commonstmp1| |}} 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.

Blank

{{NavigationBox
 | Name = {{subst:PAGENAME}}
 | Title = 
 | Image = 
 | List = 
 | Category = 
 | Summary = 
}}

Parameters

Mandatory

Name
Name of the template, include for future use when Tnavbar functionality is added.
Title
Text that appears centered in the titlebar (the top bar). Usually this is the template's topic, i.e. a succinct description of the body contents.
List
Contents of the navigation box. Use &#124; to separate links. It is not possible to include a pipe ("|") in the contents as this symbol is used to separate parameters.

Optional

Color
Header color. Default is #ccf. Use of this parameter is discouraged. Where it is used, care and consensus are needed as multiple navigational templates on one page with different titlebar colors will probably look unpleasant.
Image
The image. Must include [[Image:...|?px|alt text]]
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 .

Examples

Example 1

The following code:

{{NavigationBox
| Name = US Presidents
| Title = The first 25 Presidents of the United States
| Image = [[Image:USPresidentialSeal.jpg|60px|U.S. presidential seal]]
| Summary = A list of the first 25 US Presidents
| Color =
| Category =
| List = [[George Washington|Washington]]&nbsp;• [[John Adams|J&nbsp;Adams]]&nbsp;• [[Thomas Jefferson|Jefferson]]&nbsp;• [[James Madison|Madison]]&nbsp;• [[James Monroe|Monroe]]&nbsp;• [[John Quincy Adams|JQ&nbsp;Adams]]&nbsp;• [[Andrew Jackson|Jackson]]&nbsp;• [[Martin Van Buren|Van&nbsp;Buren]]&nbsp;• [[William Henry Harrison|W&nbsp;Harrison]]&nbsp;• [[John Tyler|Tyler]]&nbsp;• [[James K. Polk|Polk]]&nbsp;• [[Zachary Taylor|Taylor]]&nbsp;• [[Millard Fillmore|Fillmore]]&nbsp;• [[Franklin Pierce|Pierce]]&nbsp;• [[James Buchanan|Buchanan]]&nbsp;• [[Abraham Lincoln|Lincoln]]&nbsp;• [[Andrew Johnson|A&nbsp;Johnson]]&nbsp;• [[Ulysses S. Grant|Grant]]&nbsp;• [[Rutherford B. Hayes|Hayes]]&nbsp;• [[James Garfield|Garfield]]&nbsp;• [[Chester A. Arthur|Arthur]]&nbsp;• [[Grover Cleveland|Cleveland]]&nbsp;• [[Benjamin Harrison|B&nbsp;Harrison]]&nbsp;• [[Grover Cleveland|Cleveland]]&nbsp;• [[William McKinley|McKinley]]
}}

yields:

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

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

Template:Navigational templates