Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Navbox/doc: Difference between revisions

Template page
Arin Mara (talk | contribs)
Update dependencies.
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
;Description
; Description
:This template allows a [[:Category:Navigational templates|navigational template]] to be set up relatively quickly by supplying it one or more [[:Template:Flatlist|lists of links]].
: This template allows a [[:Category:Navigational templates|navigational template]] to be set up relatively quickly by supplying it one or more [[:Template:Flatlist|lists of links]].
:It comes equipped with default styles that should work for most navigational templates. Changing the default styles is not recommended, but is possible.
: It comes equipped with default styles that should work for most navigational templates. Changing the default styles is not recommended, but is possible.
;Dependencies:
 
:* [[Template:NavboxCSS]]
; Dependencies:
:* [[Template:Navbar]]
:; Uses
;Syntax
:: {{T|Navbox/styles.css}}
:: CSS class nowraplinks in [[MediaWiki:Common.css|Common.css]]
:: {{T|Navbar}}
:; Used by
:: {{T|AnomicMissionNav}}
:: {{T|Navbox classes}}
:: {{T|EVEUniversityNav}}
:: {{T|EWAR Links}}
:: {{T|FactionsNav}}
:: {{T|GasNebulaeNav}}
:: {{T|GettingStartedNav}}
:: {{T|Incursions sites horizontal}}
:: {{T|Limited time events}}
:: {{T|Mining Links}}
:: {{T|Missionrelated}}
:: {{T|UniWikiNav}}
 
; Syntax
<pre>{{Navbox
<pre>{{Navbox
|bodyclass =
|name           = {{subst:PAGENAME}}
|name = {{subst:PAGENAME}}
|navbar          =
|title =  
|title           =  
|titleclass =  
|titleclass     =  
|state =
|state           =
|titlestyle =
|bodyclass      =
|groupstyle =  
|bodystyle      =
|image =  
|innerstyle      =
|imageleft =
|basestyle      =
|above =  
|titlestyle     =
|groupstyle     =
|titlegroupstyle =
|image           =
|imagestyle      =
|imageleft       =
|imageleftstyle  =
|above           =
|abovestyle      =
|liststyle      =


|group1 =  
|group1         =  
|list1 =  
|list1           =  


|group2 =  
|group2         =  
|list2 =  
|list2           =  
  ...
  ...
|group20 =  
|group20         =  
|list20 =  
|list20         =  


|below =  
|below           =
|belowstyle      =
}}</pre>
}}</pre>
; Parameters
; Parameters
The only mandatory parameters are <code>name</code>, <code>title</code> and <code>list1</code>.
: The only mandatory parameters are <code>title</code> and <code>list1</code>. Use all class and style parameters sparingly!
:<code>bodyclass</code>
:; name : The name of the template. Set to <nowiki>{{subst:PAGENAME}}</nowiki> by default. used for the (v)iew, (t)alk and (e)dit link options. May be omitted when navbar is set to plain.
:: Applies an HTML <code>class</code> attribute to the entire navbox. Use sparingly!
:; navbar : Controls the presence of the (v)iew, (t)alk and (e)dit link options. Use <code>plain</code> to suppress.
:<code>name</code>
:; title : Text in the title bar.
:: The name of the template. Set to <nowiki>{{subst:PAGENAME}}</nowiki> by default.
:; titleclass : Applies an CSS <code>class</code> to the title bar. Use sparingly!
:<code>title</code>
:; state = [autocollapse, collapsed, expanded, plain, off]</code> : The status of box expansion. Use sparingly!
:: Text in the title bar.
:<code>titleclass</code>
:: Applies an HTML <code>class</code> attribute to the title bar. Use sparingly!
:<code>state = [autocollapse, collapsed, expanded, plain, off]</code>
:: The status of box expansion. Use sparingly!
::* Defaults to <code>autocollapse</code>. A navbox with <code>autocollapse</code> will start out collapsed if there are two or more tables on the same page that use other collapsible tables. Otherwise, the navbox will be expanded.
::* Defaults to <code>autocollapse</code>. A navbox with <code>autocollapse</code> will start out collapsed if there are two or more tables on the same page that use other collapsible tables. Otherwise, the navbox will be expanded.
::* If set to <code>collapsed</code>, the navbox will always start out in a collapsed state.
::* If set to <code>collapsed</code>, the navbox will always start out in a collapsed state.
Line 46: Line 69:
::* If set to <code>plain</code>, the navbox will always be expanded with no [hide] link on the right, and the title will remain centered.
::* If set to <code>plain</code>, the navbox will always be expanded with no [hide] link on the right, and the title will remain centered.
::* If set to <code>off</code>, the navbox will always be expanded with no [hide] link on the right, but no padding will be used to keep the title centered. This is for advanced use only; the "plain" option should suffice for most applications where the [show]/[hide] button needs to be hidden.
::* If set to <code>off</code>, the navbox will always be expanded with no [hide] link on the right, but no padding will be used to keep the title centered. This is for advanced use only; the "plain" option should suffice for most applications where the [show]/[hide] button needs to be hidden.
:<code>titlestyle</code>
:; bodyclass : Applies an CSS<code>class</code> to the entire navbox. Use sparingly!
:: A CSS style for the title-bar, such as: <code>background:gray;</code> Use sparingly!
:; titlestyle : A CSS style for the title-bar, such as: <code>background:gray;</code> Use sparingly!
:<code>groupstyle</code>
:; groupstyle : A CSS style for the group-cells, such as: <code>background:#EEEEEE;</code> Use sparingly!
:: A CSS style for the group-cells, such as: <code>background:#eee;</code> Use sparingly!
:; image : An optional right-side image, coded as the whole image. Typically it is purely decorative, so it should be coded as <code><nowiki>[[File:</nowiki><var>XX</var><nowiki>.jpg|90px|link=|alt=]]</nowiki></code>. Use sparingly!
:<code>image</code>
:; imageleft : An optional left-side image (code the same as the "image" parameter). Use sparingly!
:: An optional right-side image, coded as the whole image. Typically it is purely decorative, so it should be coded as <code><nowiki>[[File:</nowiki><var>XX</var><nowiki>.jpg|90px|link=|alt=]]</nowiki></code>. Use sparingly!
:; above : Text to appear above the group/list section (could be a list of overall wikilinks).
:<code>imageleft</code>
:; group<sub>n</sub> : The left-side text before list-n (if group-n omitted, list-n starts at left of box).
:: An optional left-side image (code the same as the "image" parameter). Use sparingly!
:; list<sub>n</sub> : Text listing links. See [[Template:Flatlist]].
:<code>above</code>
:; below : Optional text to appear below the group/list section.
:: Text to appear above the group/list section (could be a list of overall wikilinks).
 
:<code>group<sub>n</sub></code>
;Sample
:: The left-side text before list-n (if group-n omitted, list-n starts at left of box).
:<code>list<sub>n</sub></code>
:: Text listing links. See [[Template:Flatlist]].
:<code>below</code>
:: Optional text to appear below the group/list section.
;Sample output
<pre>
<pre>
{{Navbox
{{Navbox
Line 83: Line 100:
}}
}}


|group20 = Group Twenty Test Test
|group20 = Group Twenty
|list20 = {{flatlist|
|list20 = {{flatlist|
* [[EVE University]]
* [[EVE University]]
Line 111: Line 128:
# [[EVE University Management]]
# [[EVE University Management]]
# [[EVE University Rules]]
# [[EVE University Rules]]
}}
|list3 = {{flatlist|
* ''list3''
* ''(without group3)''
}}
}}


Line 122: Line 144:
|below = Text written below the link lists.
|below = Text written below the link lists.
}}
}}
;See also:
 
; See also:
:* [[Template:Flatlist]]
:* [[Template:Flatlist]]
:* [https://en.wikipedia.org/wiki/Template:Navbox Wikipedia Navbox]
:* [https://en.wikipedia.org/wiki/Template:Navbox Wikipedia Navbox]


<includeonly>[[Category:Navigational templates]]</includeonly>
<includeonly>[[Category:Navbox templates| Navbox]]<!-- This sortkey deliberate starts with a space to sort this article before the alphabetical listed --></includeonly>
<noinclude>[[Category:Template documentation]]</noinclude>
<noinclude>[[Category:Template documentation]]</noinclude>