Module:Navbox/doc: Difference between revisions

From MiiWiki
Jump to navigationJump to search
(Created page with "This module generates a navbox in an easier way and allows to select a mode and colors. ===Basic example=== <pre> {{#invoke:navbox|MODE|color1=BACKGROUND|color2=BORDER|color3=HEADER-CELLS|TITLE| Head / Item, Item, Item, Item Head / Item, Item, Item ... }} </pre> * <code>MODE</code> defines the mode of the items. The available modes are ** <code>list</code>: items are defined normally, so you can place a link, or something else, individually. ** <code>autolink</code>: e...")
 
mNo edit summary
 
Line 4: Line 4:
<pre>
<pre>
{{#invoke:navbox|MODE|color1=BACKGROUND|color2=BORDER|color3=HEADER-CELLS|TITLE|
{{#invoke:navbox|MODE|color1=BACKGROUND|color2=BORDER|color3=HEADER-CELLS|TITLE|
Head / Item, Item, Item, Item
Head // Item, Item, Item, Item
Head / Item, Item, Item
Head // Item, Item, Item
...
...
}}
}}
Line 18: Line 18:
* <code>TITLE</code> defines the title of the navbox.
* <code>TITLE</code> defines the title of the navbox.


After the title, press enter to jump to the next line and then type the title of the section, the head-cell (<code>Head</code>), then insert a forward slash and start typing the items (<code>Item</code>). Split each item with a comma.
After the title, press enter to jump to the next line and then type the title of the section, the head-cell (<code>Head</code>), then insert two forward slashes and start typing the items (<code>Item</code>). Split each item with a comma.


All of the items need to be in one single line along the head-cell, if you break a line this will create a new section.
All of the items need to be in one single line along the head-cell, if you break a line this will create a new section.
Line 24: Line 24:
===View===
===View===
{{#invoke:navbox|list|color1=beige|color2=green|color3=cyan|My navbox|
{{#invoke:navbox|list|color1=beige|color2=green|color3=cyan|My navbox|
Head / Item, Item, Item, Item
Head // Item, Item, Item, Item
Head / Item, Item, Item
Head // Item, Item, Item
}}
}}


<pre>
<pre>
{{#invoke:navbox|list|color1=beige|color2=green|color3=cyan|My navbox|
{{#invoke:navbox|list|color1=beige|color2=green|color3=cyan|My navbox|
Head / Item, Item, Item, Item
Head // Item, Item, Item, Item
Head / Item, Item, Item
Head // Item, Item, Item
}}
}}
</pre>
</pre>

Latest revision as of 16:06, 6 January 2022

This module generates a navbox in an easier way and allows to select a mode and colors.

Basic example

{{#invoke:navbox|MODE|color1=BACKGROUND|color2=BORDER|color3=HEADER-CELLS|TITLE|
Head // Item, Item, Item, Item
Head // Item, Item, Item
...
}}
  • MODE defines the mode of the items. The available modes are
    • list: items are defined normally, so you can place a link, or something else, individually.
    • autolink: each item is turned into a link automatically. This is better suited for specific situations where all the pages do not need any modifications to the link.
  • color1 defines the background color of the navbox.
  • color2 defines the border color.
  • color3 defines the background color of the header cells.
  • TITLE defines the title of the navbox.

After the title, press enter to jump to the next line and then type the title of the section, the head-cell (Head), then insert two forward slashes and start typing the items (Item). Split each item with a comma.

All of the items need to be in one single line along the head-cell, if you break a line this will create a new section.

View

My navbox
Head
  • Item
  • Item
  • Item
  • Item
Head
  • Item
  • Item
  • Item
{{#invoke:navbox|list|color1=beige|color2=green|color3=cyan|My navbox|
Head // Item, Item, Item, Item
Head // Item, Item, Item
}}