Template:Navbox2/doc: Difference between revisions

From Subnautica Wiki
No edit summary
Tag: sourceedit
(Redirected page to Template:Navbox/doc)
Tag: New redirect
 
Line 1: Line 1:
#REDIRECT [[Template:Navbox/doc]]
==Description==
This template should be used in navbox templates, which should be included at the bottom of each page that is linked in the template.

==Usage==
{| class="article-table " width="100%;"
|-
! Parameter(s)
! Usage
! style="width: 9%" | Default value(s)
|-
| {{{name}}}
| Should be identical to the template's name without namespace.
| {{{name}}}
|-
| {{{title}}}
| Sets the title used at the top of the navbox.
| {{{title}}}
|-
| {{{state}}}
| Allows you to change the collapsing state of the table. [[mw:Manual:Collapsible elements#Common.js script (Before 1.18)|More info]]. Collapsed is removed while on pages in the Template namespace, to make editing easier.
| collapsible
|-
| {{{titlestyle}}}
| Allows custom styling for the title area
| ''None''
|-
| {{{bodystyle}}}
| Allows custom styling for the body area
| ''None''
|-
| {{{groupstyle}}}
| Allows custom styling for the group area
| ''None''
|-
| {{{liststyle}}}
| Allows custom styling for the list area
| ''None''
|-
| {{{group1-20}}}
| Adds the heading for the group number specified
| {{{group1}}} = {{{group1}}}<br>{{{group2-20}}} = ''None''
|-
| {{{list1-20}}}
| Adds text for the list number specified
| {{{list1}}} = {{{list1}}}<br>{{{list2-20}}} = ''None''
|}

==Sample output==
<pre>
{{Navbox2
| name = Navbox
| title = Navbox
| bodyclass = hlist

| group1 = Group 1
| list1 = List 1

| group2 = Group 2
| list2 = {{Navbox2|child
| group1 = Group 2.1
| list1 = List 2.1

| group2 = Group 2.2
| list2 = {{Navbox2|child
| group1 = Group 2.2.1
| list1 = List 2.2.1

| group2 = Group 2.2.2
| list2 = List 2.2.2
}}

| group3 = Group 2.3
| list3 = List 2.3
}}

| group3 = Group 3
| list3 =
* List 3
* List
* List
}}
</pre>
{{Navbox2
| name = Navbox
| title = Navbox
| bodyclass = hlist

| group1 = Group 1
| list1 = List 1

| group2 = Group 2
| list2 = {{Navbox2|child
| group1 = Group 2.1
| list1 = List 2.1

| group2 = Group 2.2
| list2 = {{Navbox2|child
| group1 = Group 2.2.1
| list1 = List 2.2.1

| group2 = Group 2.2.2
| list2 = List 2.2.2
}}

| group3 = Group 2.3
| list3 = List 2.3
}}

| group3 = Group 3
| list3 =
* List 3
* List
* List
}}

==Regarding the Subnautica wiki style of navbox==
This is the base model used for the navigational templates of the wiki. You can copy and past it for the creation of new navboxes, then simply fill in the group titles and lists.

<pre>
{{Navbox2
|name = Navbox name
|state = mw-collapsible
|title = Title

|style = width:100%; margin-top:1em; border-radius:0.5em; border:1px solid #999; font-size:90%; text-align:center;
|titlestyle= background-color:#3366CC; border-radius:0.5em; color:#FFFFFF; padding:0.2em 0.5em; text-align:center;
|groupstyle= background-color:#3366CC; border-radius:0.5em 0 0 0.5em; color:#FFFFFF; padding:0.2em 0.5em; text-align:center; width:10%;
|liststyle = background:transparent; color:#FFF; text-align:left;

|group1 = Group 1
|list1 = List 1

|group2 = Group 2
|list2 = List 2

|group3 = Group 3
|list3 = List 3
}}
</pre>

{{Navbox2
|name = Navbox name
|state = mw-collapsible
|title = Title

|style = width:100%; margin-top:1em; border-radius:0.5em; border:1px solid #999; font-size:90%; text-align:center;
|titlestyle= background-color:#3366CC; border-radius:0.5em; color:#FFFFFF; padding:0.2em 0.5em; text-align:center;
|groupstyle= background-color:#3366CC; border-radius:0.5em 0 0 0.5em; color:#FFFFFF; padding:0.2em 0.5em; text-align:center; width:10%;
|liststyle = background:transparent; color:#FFF; text-align:left;

|group1 = Group 1
|list1 = List 1

|group2 = Group 2
|list2 = List 2

|group3 = Group 3
|list3 = List 3
}}

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

Latest revision as of 01:48, 6 April 2022