v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Editing Template:Navbox/doc

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.


The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 27: Line 27:
  
 
==Parameters==
 
==Parameters==
 +
''WIP''
 
===Setup parameters===
 
===Setup parameters===
: <code>name</code> — the title portion of the template's page location, i.e. <code><nowiki>[[Template:NAME HERE]]</nowiki></code>. Required for the top-left navbar to work properly.
+
: <code>name</code>
::When creating a new navbox, you can set this parameter to <code><nowiki>{{subst:PAGENAME}}</nowiki></code>; this will automatically turn into the template's name when you save your changes.
+
: <code>state</code>
: <code>state</code> — sets the initial collapsed state. Common values include <code>autocollapse</code>, <code>collapsed</code>, <code>uncollapsed</code> and <code>expanded</code>. Defaults to <code>autocollapse</code>. It is strongly recommended to set this parameter to <code><nowiki>{{{state|}}}</nowiki></code>, as this allows users to change the navbox's state locally, e.g. <code><nowiki>{{Creatures|state=expanded}}</nowiki></code>.
+
: <code>navbar</code>
:: <code>autocollapse</code> — hides the content if there is another collapsible element on the page. Otherwise, it shows the content.
+
: <code>border</code> or <code>{{{1}}}</code>
:: <code>collapsed</code> — hides the content.
 
:: <code>expanded</code> or <code>uncollapsed</code> — shows the content.
 
: <code>navbar</code> — disables the navigation links on the top-left. Only accepts <code>off</code>.
 
: <code>border</code> or <code>{{{1}}}</code> — accepted values are <code>subgroup</code> and <code>child</code>. See [[#Child navboxes|§ Child navboxes]].
 
  
 
===Cells===
 
===Cells===
: <code>title</code> — title text.
+
: <code>title</code>
: <code>above</code> — text between the title bar and the first group/list.
+
: <code>above</code>
: <code>group<sub>n</sub></code> (''group1'', ''group2'', ... , ''group30'') — text displayed inside a box on the left side of its ''list''. Can be omitted. It won't display if its ''list'' is empty or undefined.
+
: <code>group<sub>n</sub></code>
: <code>list<sub>n</sub></code> (''list1'', ''list2'', ... , ''group30'') — main content, usually a list of links. Unlike ''group'', it can exist on its own; if ''group'' is omitted, the text will be centered.
+
: <code>list<sub>n</sub></code>
: <code>below</code> — footer text (bar below groups and lists).
+
: <code>below</code>
  
 
===Style parameters===
 
===Style parameters===
Quotations ("") or <code>style=</code> are unnecessary.
+
: <code>bodystyle</code>
 
+
: <code>titlestyle</code>
: <code>bodystyle</code> — CSS style for the <nowiki><table></nowiki> element.
+
: <code>basestyle</code>
: <code>titlestyle</code> — CSS style for the title bar.
+
: <code>abovestyle</code>
: <code>basestyle</code> — Combination of titlestyle, abovestyle, belowstyle and groupstyle. Overwritten by titlestyle, abovestyle, belowstyle, groupstyle and group<sub>n</sub>style.
+
: <code>belowstyle</code>
: <code>abovestyle</code> — CSS style for the above bar.
+
: <code>groupstyle</code>
: <code>belowstyle</code> — CSS style for the below bar.
+
: <code>group<sub>n</sub>style</code>
: <code>groupstyle</code> — CSS style for all group boxes.
+
: <code>liststyle</code>
: <code>group<sub>n</sub>style</code> — CSS style for a specific group box, where <sub>n</sub> denotes the group (group1style → group1, etc.).
+
: <code>list<sub>n</sub>style</code>
: <code>liststyle</code> —  CSS style for all lists.
+
: <code>listpadding</code>
: <code>list<sub>n</sub>style</code> — CSS style for a specific list, where <sub>n</sub> denotes the list (list1style → list1, etc.).
 
: <code>listpadding</code> — sets the padding for lists. Default is <code>0em 0.25em</code>.
 
  
 
====Default styles====
 
====Default styles====
Line 116: Line 111:
 
| name  = Navbox/doc
 
| name  = Navbox/doc
 
| title = [[Soil]]
 
| title = [[Soil]]
| state = expanded
+
| state = {{{state|expanded}}}
| navbar = off
+
| titlestyle = background-color: #c0e1d1;
| titlestyle = background-color: #FFFF00;
+
| basestyle = background-color: #b0cabd;
| basestyle = background-color: #C0C0C0;
 
  
 
| group1 = Topsoil
 
| group1 = Topsoil
 
| list1  = [[Loam]] • [[Loamy sand]] • [[Peat]] • [[Sandy clay loam]] • [[Sandy loam]] • [[Silt]] • [[Silt loam]] • [[Silty clay loam]]
 
| list1  = [[Loam]] • [[Loamy sand]] • [[Peat]] • [[Sandy clay loam]] • [[Sandy loam]] • [[Silt]] • [[Silt loam]] • [[Silty clay loam]]
  
| group2style = background-color: #00FFFF; color: white;
 
 
| group2 = Ocean floor
 
| group2 = Ocean floor
 
| list2  = [[Calcareous ooze]] • [[Pelagic clay]] • [[Siliceous ooze]]
 
| list2  = [[Calcareous ooze]] • [[Pelagic clay]] • [[Siliceous ooze]]
Line 132: Line 125:
  
 
| group4 = Clay
 
| group4 = Clay
| list4style = border: 1px solid black; font-size: 114%;
 
 
| list4  = [[Clay]] • [[Clay loam]] • [[Fire clay]] • [[Sandy clay]] • [[Silty clay]]
 
| list4  = [[Clay]] • [[Clay loam]] • [[Fire clay]] • [[Sandy clay]] • [[Silty clay]]
  
Line 142: Line 134:
 
| name  = Navbox/doc
 
| name  = Navbox/doc
 
| title = [[Soil]]
 
| title = [[Soil]]
| state = expanded
+
| state = {{{state|expanded}}}
| navbar = off
+
| titlestyle = background-color: #c0e1d1;
| titlestyle = background-color: #FFFF00;
+
| basestyle = background-color: #b0cabd;
| basestyle = background-color: #C0C0C0;
 
  
 
| group1 = Topsoil
 
| group1 = Topsoil
 
| list1  = [[Loam]] • [[Loamy sand]] • [[Peat]] • [[Sandy clay loam]] • [[Sandy loam]] • [[Silt]] • [[Silt loam]] • [[Silty clay loam]]
 
| list1  = [[Loam]] • [[Loamy sand]] • [[Peat]] • [[Sandy clay loam]] • [[Sandy loam]] • [[Silt]] • [[Silt loam]] • [[Silty clay loam]]
  
| group2style = background-color: #00FFFF; color: white;
 
 
| group2 = Ocean floor
 
| group2 = Ocean floor
 
| list2  = [[Calcareous ooze]] • [[Pelagic clay]] • [[Siliceous ooze]]
 
| list2  = [[Calcareous ooze]] • [[Pelagic clay]] • [[Siliceous ooze]]
Line 158: Line 148:
  
 
| group4 = Clay
 
| group4 = Clay
| list4style = border: 1px solid black; font-size: 114%;
 
 
| list4  = [[Clay]] • [[Clay loam]] • [[Fire clay]] • [[Sandy clay]] • [[Silty clay]]
 
| list4  = [[Clay]] • [[Clay loam]] • [[Fire clay]] • [[Sandy clay]] • [[Silty clay]]
  
Line 183: Line 172:
 
| name  = Navbox/doc
 
| name  = Navbox/doc
 
| title = Multiple subgroups example
 
| title = Multiple subgroups example
| state = expanded
+
| state = {{{state|expanded}}}
 
| above = Above
 
| above = Above
  
Line 228: Line 217:
 
| name  = Navbox/doc
 
| name  = Navbox/doc
 
| title = Multiple subgroups example
 
| title = Multiple subgroups example
| state = expanded
+
| state = {{{state|expanded}}}
 
| above = Above
 
| above = Above
  
Line 273: Line 262:
 
| name  = Navbox/doc
 
| name  = Navbox/doc
 
| title  = Collapsible subgroups example
 
| title  = Collapsible subgroups example
| state  = expanded
+
| state  = {{{state|expanded}}}
  
 
| list1  = {{Navbox|child
 
| list1  = {{Navbox|child
Line 285: Line 274:
 
| list2  = {{Navbox|child
 
| list2  = {{Navbox|child
 
   | title  = Collapsible subgroup 2
 
   | title  = Collapsible subgroup 2
  | state  = expanded
 
 
   | above  = Above
 
   | above  = Above
 
   | group1 = Group 2.1
 
   | group1 = Group 2.1
Line 308: Line 296:
 
| name  = Navbox/doc
 
| name  = Navbox/doc
 
| title  = Collapsible subgroups example
 
| title  = Collapsible subgroups example
| state  = expanded
+
| state  = {{{state|expanded}}}
  
 
| list1  = {{Navbox|child
 
| list1  = {{Navbox|child
Line 320: Line 308:
 
| list2  = {{Navbox|child
 
| list2  = {{Navbox|child
 
   | title  = Collapsible subgroup 2
 
   | title  = Collapsible subgroup 2
  | state  = expanded
 
 
   | above  = Above
 
   | above  = Above
 
   | group1 = Group 2.1
 
   | group1 = Group 2.1

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)

Templates used on this page: