User:Donni Iris/Sandbox/Template Navbox/doc: Difference between revisions

From Project Gorgon
Jump to navigation Jump to search
Donni Iris (talk | contribs)
No edit summary
Donni Iris (talk | contribs)
No edit summary
Line 1: Line 1:
{{Documentation subpage}}
{{dependencies|Template:Navbar}}
{{Uses TemplateStyles|Template:Navbox/styles.css|Template:Navbar/styles.css|Template:Hlist/styles.css}}
{{Navbox suite}}
== Usage ==
== Usage ==
<pre>{{User:Donni Iris/Sandbox/Template Navbox
<pre>{{User:Donni Iris/Sandbox/Template Navbox

Revision as of 14:06, 28 April 2026

Usage

{{User:Donni Iris/Sandbox/Template Navbox

| name       = {{PAGENAME}} <!-- This has to be the name of the template -->
| title      = TITLE
| titleclass = wraplinks
| listclass  = hlist
| state = autocollapse

| aboveclass = hlist
| above = Example of Navbox

| group1 = A
| list1      = 
 • [[1]]

| group2 = B
| list2      =  
 • [[2]]

| group3 = C
| list3      = 
 • [[3]]

<!-- ... -->

| below      = [[4]]

}}

<templatestyles src="User:Donni Iris/Sandbox/Navbox/styles.css" /><templatestyles src="User:Donni Iris/Sandbox/Hlist/styles.css"/>

The basic and most common parameters are as follows (see below for the full list):

name – the name (Wikipedia location) of the template.
title – text in the title bar, such as: [[Navigation stuff]].
listclass – a CSS class for the list cells, usually hlist for horizontal lists. Alternatively, use bodyclass for the whole box.
state – controls when a navbox is expanded or collapsed.
titlestyle – a CSS style for the title-bar, such as: background: gray;
groupstyle – a CSS style for the group-cells, such as: background: #eee;
above – text to appear above the group/list section (could be a list of overall wikilinks).
image – an optional right-side image, coded as the whole image, such as: [[File:XX.jpg|80px|alt=Alternate text]]
imageleft – an optional left-side image (code the same as the "image" parameter).
groupn – the left-side text before list-n (if group-n omitted, list-n extends to the left edge of the box, and defaults to text-align:center styling).
listn – text listing wikilinks using a wikilist format.
below – optional text to appear below the group/list section.