FANDOM


Title?
Vorlagen-Dokumentation (Für die oben gezeigte Vorlage, manchmal unsichtbar oder versteckt.)


Metavorlage um Navigationsboxen zu bauen. Ein Navigationsbox ist eine Gruppierung von in vielfach zusammenhängenden Artikeln sowie verwendeten Verbindungen, um Navigation zwischen jenen Artikeln zu erleichtern.

Bis zu 8 Blöcke mit bis zu 8 Inhalten & Gruppenfeldern wird jeder, sowie das Anzeigen der Reihen in einem auf die Säule gegründeten oder horizontalen Entwurf und dem Bilden von zusammenklappbaren Gruppen unterstützen. Jede dieser Optionen kann für individuelle Blöcke oder der ganzen Navbox angegeben werden. Außerdem, Navboxes gebaut mit dieser Meta-Schablone kann innerhalb einander genistet/gezeigt werden. Die Schablone unterstützt auch Anzeigen-Images nach links und/oder Recht auf individuelle Blöcke oder den ganzen navbox.

Standard-Navboxen (d.h. diejenigen, die an der Unterseite von einem Artikel eingefügt sind), ist zusammenklappbar und wird standardmäßig autozusammengebrochen (das kann geändert werden, die Autozusammenbruch-Grenze in MediaWiki:Common.js verändernd). Seite navboxes ist standardmäßig nicht zusammenklappbar und zählt zu dieser Grenze nicht.

Benutzung

{{Navbox
|1               ={{{1|}}}
|editlink        =Navboxbeispiel
|title           =Beispiele in der ''Fallout'' Welt
|contentA1       =Links
}}

Einfache Navbox-Erstellung

The box below allows you to create a new {{Navbox}} with the appropriate layout. Simply enter the name of the new navbox ("Vorlage:Navbox" is automatically added) and click the "Create" button.

Name der Navbox eingeben:

Parameter

requiredIcon required
<unnamed 1>
This parameter should always be set to {{{1|}}} (see the example under "Usage"). It allows the layout of the navbox to be changed so it fits inside another navbox, if the parameter is set to "nested" from within the other navbox.
optionalIcon optional
blockA bis blockH
Content of block cells. blockA appears left of the groupA parameters and so forth. If no group or content fields in this block have been specified, the block is not displayed either.
optionalIcon optional
contentA1 bis contentH8
Lists of links. Make sure that links point directly to the intended pages (i.e. not to redirects) so the current page is properly marked in the template. It is recommended to sort links in each cell alphabetically for reader convenience. For standard (horizontal) rows, separate individual links with {{dot}}. For columns, use unnumbered lists (inserted with *).
semi-requiredIcon semi-required
editlink
The name of the template page; used to generate the "view"/"edit"/"discuss" links. You can use {{subst:PAGENAME}} when creating the template. If no editlink is specified, the "view"/"edit"/"discuss" links will not be displayed.
optionalIcon optional
fußzeile
Text of the footer, i.e. a row at the very bottom of the navbox.
optionalIcon optional
groupA1 bis groupH8
Content of group cells. groupA1 appears to the left of contentA1 (or above it when in column mode) and so forth. If a group field has been specified, the corresponding content becomes mandatory. For example, if groupD3 has been set, you need to set contentD3 as well.
optionalIcon optional
headerA bis headerH
Content of header rows. headerA appears above contentA1, headerB appears above contentB1 and so forth. If the block is collapsible, this becomes mandatory as it is the text which remains visible when collapsed.
optionalIcon optional
image, imageleft
Allows to specify images which should be displayed to the right (image) or left (imageleft) of the whole navbox content. Simply enter the file name without "File:". If the blocks in the navbox are collapsible, these images will remain visible even if all blocks are collapsed (but will not be visible if the navbox itself is collapsed). Be careful not to make the images too large or you risk visual oddities.
optionalIcon optional
(default: "50px")
image size, imageleft size
Size of the corresponding side image in px. image size sets the size of image and imageleft size sets the size of <ocde>imageleft</code>. Be careful not to make the images too large or you risk stretching and/or other visual oddities.
optionalIcon optional
imageA bis imageleftH
Allows to specify images which should be displayed to the right (image) or left (imageleft) of the corresponding block of cells. Simply enter the file name without "File:". If the block is collapsible, these images will not be visible if it is collapsed. Be careful not to make the images too large or you risk visual oddities.
optionalIcon optional
(default: "50x80px")
imageA size bis imageleftH size
Size of the corresponding image in px. For example, imageA size sets the size of <ocde>image A</code>. Be careful not to make the images too large or you risk stretching and/or other visual oddities.
optionalIcon optional
nestedA bis nestedH
Name of another navbox to be displayed as part of the current one (without "Template:"). If set, the other navbox replaces the whole corresponding block of cells. For example, setting nestedA results in all cells with an "A" in their name (such as blockA or contentA8) not being displayed; the specified navbox will be displayed in their place.
optionalIcon optional
nestedplainA bis nestedplainH
Similar to nested, except that it does not expect the name of a navbox to be given. You can use this to directly set up another navbox within this one, i.e. by using a {{Navbox|nested|title=Example|contentA1=Links}} template call.
optionalIcon optional
options
This parameter allows to specify options which apply to the navbox itself or all blocks inside. Multiple options can be specified at once; simply separate them with commas (,).

Available choices:

  • collapsed, collapsible, nocollapse, uncollapsed: These options control the collapse behaviour of the navbox itself. They are mutually exclusive; if more than one is specified, the navbox falls back to the default behaviour according to position.
    • collapsed means the navbox is collapsible and collapsed on page load.
    • collapsible means the navbox is collapsible and is collapsed or uncollapsed on page load according to the autocollapse limit in MediaWiki:Common.js. This is the default setting if position is set to "bottom" or not unspecified.
    • nocollapse means the navbox is not collapsible. This is the default setting if position is set to "left" or "right".
    • uncollapsed means the navbox is collapsible and uncollapsed by default.
  • collapsiblegroups: This makes all blocks within the navbox collapsible and collapsed on page load. Can be overriden for individual blocks by setting the block-specific option parameter (see below) to "uncollapsed".
  • columns: This turns all blocks into column-type blocks, i.e. blocks where the links are listed from top to bottom instead of from left to right.
  • normallists: This option only applies to column-type blocks. By default, unnumbered lists in columns have special formatting (increased line height, no bullets); with this option you can disable this formatting if desired.
  • uncollapsedgroups: This makes all block within the navbox collapsible and uncollapsed on page load. Can be overriden for individual blocks by setting the block-specific option parameter (see below) to "collapsed".
  • wraplinks: If set, line breaks can occur in the middle of links inside the navbox.
optionalIcon optional
optionsA bis optionsH
This parameter allows to specify options which apply to the corresponding block of rows. For example, optionsB applies to the block containing all cells with a "B" in their name. Multiple options can be specified at once; simply separate them with commas (,). Group-specific options override options set for the whole navbox.

Available choices:

  • collapsible, nocollapse, uncollapsed: These options control the collapse behaviour of the block. They are mutually exclusive; if more than one is specified the block will fall back to the default behaviour (or the options set for the whole box).
    • collapsed/collapsible mean the block is collapsible and collapsed on page load.
    • nocollapse means the block is not collapsible. This is the default setting.
    • uncollapsed means the block is collapsible and uncollapsed on page load.
  • columns: This turns the block rows into columns, i.e. cells displayed side-by-side where the links are listed from top to bottom instead of from left to right.
  • normallists: This option only applies to column-type blocks. By default, unnumbered lists in columns have special formatting (increased line height, no bullets); with this option you can disable this formatting if desired.
  • wraplinks: If set, line breaks can occur in the middle of links inside this block.
optionalIcon optional
(default: "bottom")
position
Intended positioning of the navbox in article pages. Also influences default width and collapse behaviour.

Available options:

  • bottom: The navbox is supposed to be put at the end of articles; full width, collapses.
  • left: The navbox is supposed to be put on the left side of articles with text flowing around it; thin navbox, not collapsible.
  • right: The navbox is supposed to be put on the right side of articles with text flowing around it; thin navbox, not collapsible.
requiredIcon required
title
The title or caption of the navbox.
optionalIcon optional
(default: "100%" oder "200px")
width
Width of the navbox in px or percent. Please note that in order to maintain a standardized look, width should only be changed if really necessary (e.g. for side boxes). All boxes placed at the bottom should keep the standard width, i.e. no width parameter should be specified.

Styleparameter

All style options should be used sparingly as they can lead to visual inconsistencies. For examples of useful style, please see the section for style below.

optionalIcon optional
blockA style bis blockH style
Specifies CSS styles to apply to the corresponding block cell. For example, blockF style applies to the cell of blockF etc.
optionalIcon optional
contentA1 style bis contentH8 style
Specifies CSS styles to apply to the corresponding content cell. For example, contentE3 style applies to the cell of contentE3 etc.
optionalIcon optional
footer style
Specifies CSS styles to apply to the footer cell.
optionalIcon optional
groupA1 style bis groupH8 style
Specifies CSS styles to apply to the corresponding group cell. For example, groupB7 style applies to the cell of groupB7 etc.
optionalIcon optional
headerA style bis headerH style
Specifies CSS styles to apply to the corresponding header cell. For example, headerD style applies to the cell of headerD etc.
optionalIcon optional
image style, imageleft style
Specifies CSS styles to apply to the cell with the corresponding side image. image style applies to the cell with image, i.e. the image at the right side of the navbox, and imageleft style applies to the cell with imageleft.
optionalIcon optional
imageA style bis imageleftH style
Specifies CSS styles to apply to the corresponding image cell. For example, imageB style applies to the cell of imageB, imageleftC style affects the cell of imageleftC etc.
optionalIcon optional
style
Specifies CSS styles to apply to every cell in the whole navbox except for the title cell.

Some examples of useful styles:

  • Changing background color: background-color: #123456; (accepts HTML color names or RGB hex triplets)
  • Changing (horizontal) text-alignment: text-align: center; (accepts "center", "justify", "left", "right")
  • Changing vertical text-alignment: vertical-align: middle; (accepts "bottom", "middle", "top")
optionalIcon optional
style blocks, style contents, style groups, style headers, style images
Specifies CSS styles to apply to all cells of a certain type. For example, style applies to every cell in the whole navbox, style blocks applies to all content cells and so forth.
optionalIcon optional
styleA bis styleH
Specifies CSS styles to apply to all cells within the corresponding block of cells. For example, styleA applies to all cells with an "A" in their name, such as blockA, contentA1, imageA etc.
optionalIcon optional
style contentsA bis style contentsH, style groupsA bis style groupsH
Specifies CSS styles to apply to a certain type of cells within the corresponding block. For example, style contentsA applies to all content cells with an "A" in their name, such as contentA1, contentA2 etc.
optionalIcon optional
title style
Specifies CSS styles to apply to the title cell.

Beispiele

Einfache Box

{{Navbox
|1               ={{{1|}}}
|editlink        =Navboxbeispiel
|title           =Beispiele in der ''Fallout'' Welt
|contentA1       =Content A
}}

resultiert in:

Beispiele in der Fallout Welt

Standardbox mit Gruppen, Blöcke und Köpfe

{{Navbox
|1               ={{{1|}}}
|editlink        =Navboxbeispiel
|title           =Beispiele in der ''Fallout'' Welt
|headerA         =Header A
|blockA          =Block A
|groupA1         =Group A1
|contentA1       =Content A1
|contentA2       =Content A2
|blockB          =Block B
|groupB1         =Group B2
|contentB1       =Content B1
}}

resultiert in:

Examples in the Fallout world

Standard Box mit Gruppen, Blöcke und Bild

{{Navbox
|1               ={{{1|}}}
|editlink        =Navboxbeispiel
|title           =Examples in the ''Fallout'' world
|image           =Wiki.png
|blockA          =Block A
|groupA1         =Group A1
|contentA1       =Content A1
|contentA2       =Content A2
|blockB          =Block B
|groupB1         =Group B1
|contentB1       =Content B1
}}

results in:

Examples in the Fallout world
Wiki

Standardbox mit Gruppen, Blöcken und Blockbilder

{{Navbox
|1               ={{{1|}}}
|editlink        =Navboxbeispiel
|title           =Examples in the ''Fallout'' world
|imageA          =Wiki.png
|blockA          =Block A
|groupA1         =Group A1
|contentA1       =Content A1
|contentA2       =Content A2
|groupA3         =Group A3
|contentA3       =Content A3
|imageB          =Wiki.png
|blockB          =Block B
|groupB1         =Group B1
|contentB1       =Content B1
|groupB2         =Group B2
|contentB2       =Content B2
|groupB3         =Group B3
|contentB3       =Content B3
}}

resultiert in:

Examples in the Fallout world

Zuklappbare Gruppen

{{Navbox
|1               ={{{1|}}}
|editlink        =Navboxbeispiel
|title           =Examples in the ''Fallout'' world
|options         =collapsiblegroups
|headerA         =Header A
|imageA          =Wiki.png
|blockA          =Block A
|groupA1         =Group A1
|contentA1       =Content A1
|contentA2       =Content A2
|groupA3         =Group A3
|contentA3       =Content A3
|imageB          =Wiki.png
|headerB         =Header B
|blockB          =Block B
|groupB1         =Group B1
|contentB1       =Content B1
|groupB2         =Group B2
|contentB2       =Content B2
|groupB3         =Group B3
|contentB3       =Content B3
}}

resultiert in:

Examples in the Fallout world

Zuklappbare und nicht-zuklappbare gemischt

{{Navbox
|1               ={{{1|}}}
|editlink        =Navboxbeispiel
|title           =Examples in the ''Fallout'' world
|optionsB        =collapsible
|blockA          =Block A
|groupA1         =Group A1
|contentA1       =Content A1
|contentA2       =Content A2
|groupA3         =Group A3
|contentA3       =Content A3
|headerB         =Header B
|blockB          =Block B
|groupB1         =Group B1
|contentB1       =Content B1
|groupB2         =Group B2
|contentB2       =Content B2
|groupB3         =Group B3
|contentB3       =Content B3
}}

resultiert in:

Examples in the Fallout world

Spalten

{{Navbox
|1               ={{{1|}}}
|editlink        =Navboxbeispiel
|title           =Examples
|options         =columns
|contentA1       =Content A1
|contentA2       =Content A2
|contentA3       =Content A3
}}

resultiert in:

Examples

Spalten und Standard-Zeilen gemischt

{{Navbox
|1               ={{{1|}}}
|editlink        =Navboxbeispiel
|title           =Examples
|optionsA        =columns
|headerA         =Header A
|contentA1       =Content A1
|contentA2       =Content A2
|headerB         =Header B
|groupB1         =Group B1
|contentB1       =Content B1
|groupB2         =Group B2
|contentB2       =Content B2
}}

results in:

Examples

Seitennavbox

Examples
{{Navbox
|1               ={{{1|}}}
|editlink        =Navboxbeispiel
|title           =Examples
|position        =right
|options         =columns
|headerA         =Header A
|contentA1       =Content A1
|contentA2       =Content A2
|contentA3       =Content A3
}}

Technisches

  • Diese Vorlage ist recht kompliziert. Bearbeiten erfordert gutes Verständnis von Parserfunktionen & Wikisyntax.
  • Hilfsvorlagen:
    • {{Navbox/aux}}: Vereint verschiedene Eingabeparameter, berechnet die Zeilen-und Spaltenanzahl für einen vorhandenen Block und gibt das Ergebnis an {{Navbox/aux2}} oder {{Navbox/aux3}} weiter (abhängig vom vorgegebenen Entwurfstyp).
    • {{Navbox/aux2}}: Gibt einen ganzen Block von Standard-Zeilen nach angegebenen Optionen und Zellen zurück.
    • {{Navbox/aux3}}: Gibt einen ganzen Block von Spalten zurück, entsprechend der angegebenen Optionen und Zellen.
  • Standardisierte Dokumentation für Vorlagen basierend auf dieser:
Dokumentation transkludiert aus Vorlage:Navbox/doc.
Nutzung von Community-Inhalten gemäß CC-BY-SA , sofern nicht anders angegeben.