Template:Navbox: Difference between revisions

From PZwiki
(added more info to the doc & fixes to "above")
(update)
Line 1: Line 1:
<noinclude>
<noinclude>
{{wip}}
{{Documentation/sandbox|doc =
{{Documentation/sandbox|doc =
{{Underconstruction}}


==Usage==
==Usage==
Line 14: Line 14:


===Parameters===
===Parameters===
;<code>title</code>{{sup|required}}
;<code>title</code> {{sup|required}}
: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 conntent. {{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.
;<code>image</code>
;<code>image</code>
Line 26: Line 26:
;<code>below</code>
;<code>below</code>
:Displayed beneath the content.
:Displayed beneath the content.
 
;<code>class</code>
:Color of the navbox, can be <code>blue</code> or <code>red</code>. Default is <code>red</code>.


'''''The following are from {{tll|Navbox/row}}.'''''
'''''The following are from {{tll|Navbox/row}}.'''''
Line 33: Line 34:
;<code>list</code>
;<code>list</code>
:List of articles to be linked to. Usually separated with a bullet point <code>&bull;</code> or {{code|&bull;}}
:List of articles to be linked to. Usually separated with a bullet point <code>&bull;</code> or {{code|&bull;}}


==Examples==
==Examples==
Line 55: Line 55:
   | id = sub
   | id = sub
   | image = [[File:Image.png|80px]]
   | image = [[File:Image.png|80px]]
  | class = blue
   }}
   }}
| image = [[File:Image.png|100px]]
| image = [[File:Image.png|100px]]
Line 62: Line 63:
}}
}}
{{ll|Category:Navbox}}
{{ll|Category:Navbox}}
</noinclude><includeonly><div class="navbox">
</noinclude><includeonly><div class="navbox theme-{{#switch:{{{class|}}}|blue=blue|#default=red}}">
   <div class="navbox-row navbox-title">{{#if:{{{title|}}}|{{{title}}}|Title}}</div>
   <div>{{#if:{{{title|}}}|{{{title}}}|Title}}</div>
   {{#if:{{{above|}}}|<div class="navbox-row mw-collapsible" id="mw-customcollapsible-navbox-{{{id|[[Category:Incorrect template usage]]}}}" style="background-color:#EAECF0; color:black;">{{{above}}}</div>}}
   <div class="mw-collapsible" id="mw-customcollapsible-navbox-{{{id|[[Category:Incorrect template usage]]}}}">
  <div class="navbox-section mw-collapsible" id="mw-customcollapsible-navbox-{{{id|[[Category:Incorrect template usage]]}}}">
    {{#if:{{{above|}}}|<div class="navbox-row">{{{above}}}</div>}}
  <div>{{{content|}}}</div>
    <div class="navbox-section">
  {{#if:{{{image|}}}|<div class="navbox-image">{{{image}}}</div>}}
      <div>{{{content|}}}</div>
      {{#if:{{{image|}}}|<div>{{{image}}}</div>}}
    </div>
    {{#if:{{{below|}}}|<div class="navbox-row">{{{below}}}</div>}}
   </div>
   </div>
   <div class="navbox-toggle mw-customtoggle-navbox-{{{id|[[Category:Incorrect template usage]]}}}">×</div>
   <div class="toggle mw-customtoggle-navbox-{{{id|}}}"></div>
  {{#if:{{{below|}}}|<div class="navbox-row mw-collapsible" id="mw-customcollapsible-navbox-{{{id|[[Category:Incorrect template usage]]}}}">{{{below}}}</div>}}
</div></includeonly>
</div></includeonly>

Revision as of 08:20, 6 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 06/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 conntent. {{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.
class
Color of the navbox, can be blue or red. Default is red.

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

Editors can experiment in this template's sandbox.