Template:Navbar/doc

From Harding Wiki
Jump to navigationJump to search

{{#ifeq: doc | doc

 | 

{{

   #ifeq: show | show
   | {{
 {{#switch:
 {{#if: 
   | 
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = ambox | talk = tmbox | user = ombox | wikipedia = ombox | file | image = imbox | mediawiki = ombox | template = ombox | help = ombox | category = cmbox | portal = ombox | book = ombox | other | #default = ombox

}} | type = notice | image = File:Edit-copy green.svg | imageright = | style = | textstyle = | text = This is a documentation subpage for Template:Navbar.
It contains usage information, categories, interlanguage links and other content that is not part of the original {{ #if: | {{{text2}}} | {{ #if: | {{{text1}}} | {{ #ifeq: Template | User | template template page | {{ #if: Template |template page|article}}}}}}}}. | small = | smallimage = | smallimageright = | smalltext = }}

   }}{{
   #if: 
   | 
   | [[Category:{{
     #if: Template
     | Template
     | Article
   }} documentation {{#ifeq:Template|Template|pages}}]]
 }}

| }} {{#ifeq:|yes

|

{{#ifeq:{{#if:| {{{smallimage}}} | }}|none | | }}

{{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none

 | 
|
 }}

}}

{{#switch:content

| | speedy | delete | content | style | move | protection | notice =

| #default =

This message box is using an invalid "type=content" parameter and needs fixing.

[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Navbar/doc]]

}}

|

{{#ifeq:|none | | }}

{{#if: | {{#ifeq:|none

 | 
|
 }}

}}

{{#switch:content

| | speedy | delete | content | style | move | protection | notice =

| #default =

This message box is using an invalid "type=content" parameter and needs fixing.

[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Navbar/doc]]

}} }}

Usage

General

Copyable examples when inside a given template adds navbar navigational functionality:

{{navbar|{{subst:PAGENAME}}|mini=1}}
{{navbar|{{subst:PAGENAME}}|plain=1}}
{{navbar|{{subst:PAGENAME}}|fontstyle=color:green}}

The {{subst:PAGENAME}} will be substituted with the template's name when parsed by the servers. {{navbar|navbar/doc}} gives: {{#if:||This box: }}{{#if:|[}}[[{{#switch:

|#default = Navbar/doc 
| = 
   {{#ifeq:  | 
     | Template:navbar/doc            
     | Navbar/doc      
   }}

}}|{{#if:|v|view}}]] · [[|{{#if:|d|talk}}]]{{#if:|| · [{{fullurl:{{#switch:

|#default = Navbar/doc 
| = 
   {{#ifeq:  | 
     | Template:navbar/doc            
     | Navbar/doc      
   }}

}}|action=edit}} {{#if:|e|edit}}]}}{{#if:|]}}

Examples

Required parameters

  • {{navbar|Name of Template}} the template name is required.

Optional parameters

Options Parameters Produces...
Normal {{navbar|Template Name}} {{#if: [}}[[{{#switch: #default = Navbar/doc =
   {{#ifeq:  | 
Template:navbar/doc Navbar/doc
   }}

}}|{{#if:|v|view}}]] · [[|{{#if:|d|talk}}]]{{#if:|| · [{{fullurl:{{#switch:

#default = Navbar/doc =
   {{#ifeq:  | 
Template:navbar/doc Navbar/doc
   }}

}}|action=edit}} {{#if:|e|edit}}]}}{{#if:|]}}

Different text {{navbar|Template Name|text=This template:}} {{#if: [}}[[{{#switch: #default = Navbar/doc =
   {{#ifeq:  | 
Template:navbar/doc Navbar/doc
   }}

}}|{{#if:|v|view}}]] · [[|{{#if:|d|talk}}]]{{#if:|| · [{{fullurl:{{#switch:

#default = Navbar/doc =
   {{#ifeq:  | 
Template:navbar/doc Navbar/doc
   }}

}}|action=edit}} {{#if:|e|edit}}]}}{{#if:|]}}

No "This box:" text. {{navbar|Template Name|plain=1}} {{#if:1 [}}[[{{#switch: #default = Navbar/doc =
   {{#ifeq:  | 
Template:navbar/doc Navbar/doc
   }}

}}|{{#if:|v|view}}]] · [[|{{#if:|d|talk}}]]{{#if:|| · [{{fullurl:{{#switch:

#default = Navbar/doc =
   {{#ifeq:  | 
Template:navbar/doc Navbar/doc
   }}

}}|action=edit}} {{#if:|e|edit}}]}}{{#if:|]}}

Short version. {{navbar|Template Name|mini=1}} {{#if:1 [}}[[{{#switch: #default = Navbar/doc =
   {{#ifeq:  | 
Template:navbar/doc Navbar/doc
   }}

}}|{{#if:1|v|view}}]] · [[|{{#if:1|d|talk}}]]{{#if:|| · [{{fullurl:{{#switch:

#default = Navbar/doc =
   {{#ifeq:  | 
Template:navbar/doc Navbar/doc
   }}

}}|action=edit}} {{#if:1|e|edit}}]}}{{#if:|]}}

For a color option. {{navbar|Template Name|fontstyle=color:green}} {{#if: [}}[[{{#switch: #default = Navbar/doc =
   {{#ifeq:  | 
Template:navbar/doc Navbar/doc
   }}

}}|{{#if:|v|view}}]] · [[|{{#if:|d|talk}}]]{{#if:|| · [{{fullurl:{{#switch:

#default = Navbar/doc =
   {{#ifeq:  | 
Template:navbar/doc Navbar/doc
   }}

}}|action=edit}} {{#if:|e|edit}}]}}{{#if:|]}}

With brackets. {{navbar|Template Name|brackets=1}} {{#if: [}}[[{{#switch: #default = Navbar/doc =
   {{#ifeq:  | 
Template:navbar/doc Navbar/doc
   }}

}}|{{#if:|v|view}}]] · [[|{{#if:|d|talk}}]]{{#if:|| · [{{fullurl:{{#switch:

#default = Navbar/doc =
   {{#ifeq:  | 
Template:navbar/doc Navbar/doc
   }}

}}|action=edit}} {{#if:|e|edit}}]}}{{#if:1|]}}

Deprecated parameters

The miniv=1, viewplain=1, nodiv=1 and fontcolor= parameters have been deprecated. To use the view-only version, use the {{{{#if:|subst:}}v{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} or {{{{#if:|subst:}}view{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} templates instead.

Prepackaged

{{Tnavbar-header}}
Positions vTemplate:·dTemplate:·e on the right edge of the line, often used in non-collapsible navbox heading.
{{Tnavbar-navframe}}
For use in conjunction with Navframe divs, positions vTemplate:·dTemplate:·e opposite of the [hide]/[show] feature.
{{Tnavbar-collapsible}}
For use in conjunction with Collapsible tables,floats vTemplate:·dTemplate:·e opposite of the [hide]/[show] feature.

See also

Template:Edit templates Template:Navigational templates