Template:Navbox/doc: Difference between revisions

From Subnautica Wiki
No edit summary
 
(adding category)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
;Description
==Description==
:This template is used to create a basic navigation box.
This template is used as a base for other navbox templates. It invokes [[:Module:Navbox]] and supports unlimited data sets.
;Syntax
:Type <code>{{t|navbox|...}}</code> somewhere, with parameters as shown below.
;Sample output


==Parameters==
<pre>{{navbox
More parameters than the ones listed below are supported in the Module; for more information, see [[w:c:dev:Global Lua Modules/Navbox#Parameters|Dev Wiki's documentation]]. The documentation presented here is intended to be simplified for use on {{SITENAME}}.
|header=Land of Bob
|body=This <nowiki>[[place]]</nowiki> and that <nowiki>[[place]]</nowiki>.
}}</pre>


parameter<sub>n</sub> (for example, header<sub>n</sub>) allows the use of any number in place of <sub>n</sub>. For example, the first header will use the parameter '''header1''', the second '''header2''', and so on.
Results in...


;title: The main title of the navbox
{{navbox
;template: The name of the template, which will be used to generate [[:Template:Vdelinks|view/discuss/edit links]]
|header=Land of Bob
;state: The <code>state</code> parameter controls the collapsing of the navbox itself.
|body=This <nowiki>[[place]]</nowiki> and that <nowiki>[[place]]</nowiki>.
:*<code>expanded</code> (default) sets the navbox to be expanded when the page is loaded, but it can then be collapsed by the user.
}}
:*<code>collapsed</code> sets the navbox to be collapsed when the page is loaded, but it can then be expanded by the user. This is the standard behavior for navboxes on {{SITENAME}}.
:*<code>plain</code> sets the navbox to be expanded at all times without the ability to collapse it.
;above: Adds a row that appears above all other rows and below the title
;header<sub>n</sub>: Used to add subheaders to the navbox. Headers are hidden by default unless there are any list rows under them.
;group<sub>n</sub>: Contains the group label for a row. If not present, the corresponding list will expand to fill the gap.
;list<sub>n</sub>: The actual list for the row
;below: Adds a row that appears below all other rows


==Boilerplate==
<includeonly>[[Category:Templates|{{PAGENAME}}]]</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
<pre><nowiki>{{Navbox
| title =
| template =
| state = collapsed
| above =
| header1 =
| group1 =
| list1 =
| below =
}}</nowiki></pre><includeonly>[[Category:Templates|{{PAGENAME}}]][[Category:Navbox templates| ]]</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>

Latest revision as of 00:18, 7 April 2022

Description

This template is used as a base for other navbox templates. It invokes Module:Navbox and supports unlimited data sets.

Parameters

More parameters than the ones listed below are supported in the Module; for more information, see Dev Wiki's documentation. The documentation presented here is intended to be simplified for use on Subnautica Wiki.

parametern (for example, headern) allows the use of any number in place of n. For example, the first header will use the parameter header1, the second header2, and so on.

title
The main title of the navbox
template
The name of the template, which will be used to generate view/discuss/edit links
state
The state parameter controls the collapsing of the navbox itself.
  • expanded (default) sets the navbox to be expanded when the page is loaded, but it can then be collapsed by the user.
  • collapsed sets the navbox to be collapsed when the page is loaded, but it can then be expanded by the user. This is the standard behavior for navboxes on Subnautica Wiki.
  • plain sets the navbox to be expanded at all times without the ability to collapse it.
above
Adds a row that appears above all other rows and below the title
headern
Used to add subheaders to the navbox. Headers are hidden by default unless there are any list rows under them.
groupn
Contains the group label for a row. If not present, the corresponding list will expand to fill the gap.
listn
The actual list for the row
below
Adds a row that appears below all other rows

Boilerplate

{{Navbox
| title = 
| template = 
| state = collapsed
| above = 
| header1 = 
| group1 = 
| list1 = 
| below = 
}}