Template:Navbox/doc: Difference between revisions

From Portals of Phereon Wiki
Content added Content deleted
portalsofphereon>FANDOM
m (1 revision: Starter Wiki Refresh)
m (1 revision imported)
Line 1: Line 1:
{{doc/start}}
;Description
Meta-template for building navboxes. A navbox is a grouping of links used in multiple related articles to facilitate navigation between those articles.
:This template is used to create a basic navigation box. You can do so by calling the template, via the steps under "Syntax", but it is recommended to '''copy the code verbatim''' via the steps under "Navbox Creation".
;Navbox Creation
<createbox>
prefix=Template:
preload=Template:Navbox
editintro=Template:Navbox/doc
buttonlabel=Make your navbox!
default = Navbox Foo
</createbox>
#Think of a name for your navbox, like "Navbox Foo". Type it in the above field, press the button, and save the page immediately. Be ready to return to ''this'' page to see the rest of the instructions.
#Edit the resulting page in source mode.
#Replace <code>{{{header}}}</code> with the text you would like to appear in the header.
#Replace <code>{{{body}}}</code> with the text you would like to appear in the body.
#To add another section, copy these four lines of code immediately below the lines in the existing code that they resemble:
<pre>|-
! style="padding:0.2em 0.5em;" nowrap="nowrap" class="color1" | {{{header}}}
|-
| style="padding:0.2em 0.5em;" | {{{body}}}</pre>


Based on [[wikipedia:Template:Navbox]], see documentation there.
Save the page once you have added as many sections as you needed, and filled them with content. You may also want to create a /doc subpage explaining that to call the resulting template, one must only type <code>{<nowiki/>{Navbox Foo}}</code>, or rather, whatever we decided to name the template in step 1.


==Usage==
;Syntax
Blank template with commonly use options:
<pre style=display:table>
{{Navbox
| name = Navbox/doc
| state = uncollapsed
| title = title
| group1 = Group1
| list1 = List1
| group2 = Group2
| list2 = List2
| group3 = Group3
| list3 = List3
| group4 = Group4
| list4 = List4
}}
</pre>


==Parameters==
<pre>{{navbox
; name: Template name.
|header=Land of Bob
; title: text in the title bar.
|body=This <nowiki>[[place]]</nowiki> and that <nowiki>[[place]]</nowiki>.
; state: controls when a navbox is expanded or collapsed. (use "mw-collapsed" to set the navbox to collapsed)
}}</pre>
; above/below: optional text to appear above or below the group/list section.
; group(n):
; listn(n):


==Styles==
:Results in...
Styles are generally advised against, to maintain consistency among templates([[MediaWiki:Hydradark.css]] should be used instead or applied general here); but the option to modify styles parameters are given given below, for specific customization or testing purposes:


{{navbox
{{cols|3|
*style
|header=Land of Bob
*basestyle
|body=This <nowiki>[[place]]</nowiki> and that <nowiki>[[place]]</nowiki>.
*titlestylex
*groupstyle
*groupnstyle
*liststyle
*listnstyle
*listpadding
*oddstyle
*evenstyle
*abovestyle
*belowstyle
*imagestyle
*imageleftstyle
}}
}}
{{doc/end}}

<includeonly>[[Category:Templates|{{PAGENAME}}]][[Category:Templates/Navbox|{{PAGENAME}}]]</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>

Revision as of 12:34, 1 December 2019

This is a documentation subpage for Template:Navbox.
It contains usage information, categories and other content that is not part of the original template page.

Meta-template for building navboxes. A navbox is a grouping of links used in multiple related articles to facilitate navigation between those articles.

Based on wikipedia:Template:Navbox, see documentation there.

Usage

Blank template with commonly use options:

{{Navbox
| name = Navbox/doc
| state = uncollapsed
| title = title
| group1 = Group1
| list1  = List1
| group2 = Group2
| list2  = List2
| group3 = Group3
| list3 = List3
| group4 = Group4
| list4 = List4
}}

Parameters

name
Template name.
title
text in the title bar.
state
controls when a navbox is expanded or collapsed. (use "mw-collapsed" to set the navbox to collapsed)
above/below
optional text to appear above or below the group/list section.
group(n)
listn(n)

Styles

Styles are generally advised against, to maintain consistency among templates(MediaWiki:Hydradark.css should be used instead or applied general here); but the option to modify styles parameters are given given below, for specific customization or testing purposes:

  • style
  • basestyle
  • titlestylex
  • groupstyle
  • groupnstyle
  • liststyle
  • listnstyle
  • listpadding
  • oddstyle
  • evenstyle
  • abovestyle
  • belowstyle
  • imagestyle
  • imageleftstyle