Template:Navbox: Difference between revisions

From PZwiki
mNo edit summary
(added clear:both to top & initial collapsed state can be defined with 'collapsed' boolean, default is true)
Line 17: Line 17:
:Title.
:Title.
;<code>content</code> {{sup|required}}
;<code>content</code> {{sup|required}}
:Container for the conntent. {{tll|Navbox/row}} will usually be here.  
:Container for the content. {{tll|Navbox/row}} will usually be here.  
;<code>id</code> {{sup|required}}
;<code>id</code> {{sup|required}}
:The unique ID for the navbox.
:The unique ID for the navbox.
Line 28: Line 28:
;<code>theme</code>
;<code>theme</code>
:Color of the navbox, can be <code>blue</code> or <code>red</code>. Default is <code>red</code>.
:Color of the navbox, can be <code>blue</code> or <code>red</code>. Default is <code>red</code>.
;<code>collapsed</code>
:Initial state of the content. Will be collapsed by default (<code>true</code>). Set to <code>false</code> to start expanded.


'''''The following are from {{tll|Navbox/row}}.'''''
'''''The following are from {{tll|Navbox/row}}.'''''
Line 38: Line 40:
{{Navbox
{{Navbox
| title = Example
| title = Example
| collapsed = false
| above = above
| above = above
| below = below
| below = below
| content = {{Navbox
| content = {{Navbox
   | title = Sub-title
   | title = Sub-title
  | collapsed = false
   | above = above
   | above = above
   | content = {{Navbox/row
   | content = {{Navbox/row
Line 68: Line 72:


{{ll|Category:Navbox}}
{{ll|Category:Navbox}}
</noinclude><includeonly><div class="navbox theme-{{#switch:{{{theme|}}}|blue=blue|#default=red}}">
</noinclude><includeonly><div class="navbox theme-{{#switch:{{{theme|}}}|blue=blue|#default=red}}" style="clear:both;">
   <div>{{#if:{{{title|}}}|{{{title}}}|Title}}</div>
   <div>{{#if:{{{title|}}}|{{{title}}}|Title}}</div>
   <div class="mw-collapsible" id="mw-customcollapsible-navbox-{{{id|[[Category:Incorrect template usage]]}}}">
   <div class="mw-collapsible {{yesno|{{{collapsed|yes}}}|yes=mw-collapsed}}" id="mw-customcollapsible-navbox-{{{id|[[Category:Incorrect template usage]]}}}">
     {{#if:{{{above|}}}|<div class="navbox-row">{{{above}}}</div>}}
     {{#if:{{{above|}}}|<div class="navbox-row">{{{above}}}</div>}}
     <div class="navbox-section">
     <div class="navbox-section">

Revision as of 12:26, 23 January 2024

Hammer.png
This template is currently under construction.
It is in the process of an expansion or major restructuring. You are welcome to assist in its construction by editing it as well.
If this page has not been updated in a while, please replace this notice with {{Improve}}. Last edit was 23/01/2024.
Notebook.pngTemplate Documentation

Usage

{{Navbox
| title = Example
| content = {{Navbox/row
  | group = group1
  | list = list, list, list, list, list, list, list, list, list, list, list, list, 
  }}
| id = example
}}

Parameters

title Required
Title.
content Required
Container for the content. {{Navbox/row}} will usually be here.
id Required
The unique ID for the navbox.
image
Image to be displayed beneath the title and next to the content.
above
Displayed beneath the title but below the content.
below
Displayed beneath the content.
theme
Color of the navbox, can be blue or red. Default is red.
collapsed
Initial state of the content. Will be collapsed by default (true). Set to false to start expanded.

The following are from {{Navbox/row}}.

group
Group name. Used from {{Navbox/row}}
list
List of articles to be linked to. Usually separated with a bullet point or &bull;

Examples

How to translate

This template doesn't need to/shouldn't be translated, but you can translate the documentation of this template with the following steps:

  1. Create a subpage of this template with the language code of the language you want to translate to.
  2. Copy the code wrapped in the <noinclude> tag in this template into the page you created.
    {{Translation guide}} template should be removed from the translated documentation.
  3. Translate the page according to the translation requirements of normal pages.

See also

Editors can experiment in this template's sandbox.