Die Seite wurde neu angelegt: „<noinclude>{{Documentationpage}}</noinclude> Meta-template for building navboxes. A navbox is a grouping of links used in multiple related articles to facilitate …“ |
abgeändert und teilübersetzt |
||
| Zeile 1: | Zeile 1: | ||
<noinclude>{{ | <noinclude>{{Dokumentationsseite}}</noinclude> | ||
Meta-template for building navboxes. A navbox is a grouping of links used in multiple related articles to facilitate navigation between those articles. | Meta-template for building navboxes. A navbox is a grouping of links used in multiple related articles to facilitate navigation between those articles. | ||
| Zeile 6: | Zeile 6: | ||
Standard navboxes (i.e. those inserted at the bottom of an article) are collapsible and will be auto-collapsed by default (this can be changed by altering the autocollapse limit in [[MediaWiki:Common.js]]). Side navboxes are not collapsible by default and do not count towards this limit. | Standard navboxes (i.e. those inserted at the bottom of an article) are collapsible and will be auto-collapsed by default (this can be changed by altering the autocollapse limit in [[MediaWiki:Common.js]]). Side navboxes are not collapsible by default and do not count towards this limit. | ||
== | ==Benutzung== | ||
<pre> | <pre> | ||
{{Navbox | {{Navbox | ||
| Zeile 19: | Zeile 19: | ||
The box below allows you to create a new <nowiki>{{Navbox}}</nowiki> with the appropriate layout. Simply enter the name of the new navbox ("Template:Navbox" is automatically added) and click the "Create" button. | The box below allows you to create a new <nowiki>{{Navbox}}</nowiki> with the appropriate layout. Simply enter the name of the new navbox ("Template:Navbox" is automatically added) and click the "Create" button. | ||
{| | {| class="va-genericbox" cellpadding=2 cellspacing=3 | ||
|- | |- | ||
| Enter navbox name: | |||
| | | | ||
<createbox> | <createbox> | ||
| Zeile 30: | Zeile 30: | ||
|} | |} | ||
=== | ===Parameter=== | ||
{{Docparam|name=<unnamed 1>|req=yes|default=|desc= | {{Docparam|name=<unnamed 1>|req=yes|default=|desc= | ||
This parameter should always be set to <nowiki>{{{1|}}}</nowiki> (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. | This parameter should always be set to <nowiki>{{{1|}}}</nowiki> (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. | ||
| Zeile 131: | Zeile 131: | ||
}} | }} | ||
===Style | ===Style Parameter=== | ||
All <code>style</code> options should be used sparingly as they can lead to visual inconsistencies. For examples of useful style, please see the section for <code>style</code> below. | All <code>style</code> options should be used sparingly as they can lead to visual inconsistencies. For examples of useful style, please see the section for <code>style</code> below. | ||
{{Docparam|name=blockA style >> blockH style|req=no|default=|desc= | {{Docparam|name=blockA style >> blockH style|req=no|default=|desc= | ||
Specifies [[wikipedia:Cascading Style Sheets|CSS]] styles to apply to the corresponding <code> | Specifies [[wikipedia:Cascading Style Sheets|CSS]] styles to apply to the corresponding <code>block</code> cell. For example, <code>blockF style</code> applies to the cell of <code>blockF</code> etc. | ||
}} | }} | ||
| Zeile 163: | Zeile 163: | ||
{{Docparam|name=style|req=no|default=|desc= | {{Docparam|name=style|req=no|default=|desc= | ||
Specifies [[wikipedia:Cascading Style Sheets|CSS]] styles to apply to every cell in the whole navbox. | Specifies [[wikipedia:Cascading Style Sheets|CSS]] styles to apply to every cell in the whole navbox except for the <code>title</code> cell. | ||
Some examples of useful styles: | Some examples of useful styles: | ||
| Zeile 183: | Zeile 183: | ||
}} | }} | ||
== | {{Docparam|name=title style|req=no|default=|desc= | ||
=== | Specifies [[wikipedia:Cascading Style Sheets|CSS]] styles to apply to the <code>title</code> cell. | ||
}} | |||
==Beispiele== | |||
===Einfache Box=== | |||
<pre> | <pre> | ||
{{Navbox | {{Navbox | ||
| Zeile 190: | Zeile 194: | ||
|editlink =Navbox example | |editlink =Navbox example | ||
|title =Examples in the ''Fallout'' world | |title =Examples in the ''Fallout'' world | ||
|contentA1 =Content A | |contentA1 =Content A | ||
}} | }} | ||
</pre> | </pre> | ||
resultiert in: | |||
{{Navbox | {{Navbox | ||
|1 ={{{1|}}} | |1 ={{{1|}}} | ||
|editlink =Navbox example | |editlink =Navbox example | ||
|title =Examples in the ''Fallout'' world | |title =Examples in the ''Fallout'' world | ||
|contentA1 =Content A | |contentA1 =Content A | ||
}} | }} | ||
===Standard | ===Standard Box mit Gruppen, Blöcke und Köpfe=== | ||
<pre> | <pre> | ||
{{Navbox | {{Navbox | ||
| Zeile 209: | Zeile 211: | ||
|editlink =Navbox example | |editlink =Navbox example | ||
|title =Examples in the ''Fallout'' world | |title =Examples in the ''Fallout'' world | ||
|headerA =Header A | |||
|blockA =Block A | |blockA =Block A | ||
|groupA1 =Group A1 | |groupA1 =Group A1 | ||
|contentA1 =Content A1 | |contentA1 =Content A1 | ||
| Zeile 219: | Zeile 221: | ||
}} | }} | ||
</pre> | </pre> | ||
resultiert in: | |||
{{Navbox | {{Navbox | ||
|1 ={{{1|}}} | |1 ={{{1|}}} | ||
| Zeile 234: | Zeile 236: | ||
}} | }} | ||
===Standard | ===Standard Box mit Gruppen, Blöcke und Bild=== | ||
<pre> | <pre> | ||
{{Navbox | {{Navbox | ||
| Zeile 244: | Zeile 246: | ||
|groupA1 =Group A1 | |groupA1 =Group A1 | ||
|contentA1 =Content A1 | |contentA1 =Content A1 | ||
|contentA2 =Content A2 | |contentA2 =Content A2 | ||
|blockB =Block B | |blockB =Block B | ||
|groupB1 =Group B1 | |||
|contentB1 =Content B1 | |contentB1 =Content B1 | ||
}} | }} | ||
| Zeile 265: | Zeile 267: | ||
}} | }} | ||
===Standard box with | ===Standard box with Gruppen, Blöcke and Blockbilder=== | ||
<pre> | <pre> | ||
{{Navbox | {{Navbox | ||
| Zeile 288: | Zeile 290: | ||
}} | }} | ||
</pre> | </pre> | ||
resultiert in: | |||
{{Navbox | {{Navbox | ||
|1 ={{{1|}}} | |1 ={{{1|}}} | ||
| Zeile 310: | Zeile 312: | ||
}} | }} | ||
=== | ===Zuklappbare Gruppen=== | ||
<pre> | <pre> | ||
{{Navbox | {{Navbox | ||
| Zeile 336: | Zeile 338: | ||
}} | }} | ||
</pre> | </pre> | ||
resultiert in: | |||
{{Navbox | {{Navbox | ||
|1 ={{{1|}}} | |1 ={{{1|}}} | ||
| Zeile 350: | Zeile 352: | ||
|groupA3 =Group A3 | |groupA3 =Group A3 | ||
|contentA3 =Content A3 | |contentA3 =Content A3 | ||
|imageB =Wiki.png | |||
|headerB =Header B | |headerB =Header B | ||
|blockB =Block B | |blockB =Block B | ||
|groupB1 =Group B1 | |groupB1 =Group B1 | ||
| Zeile 361: | Zeile 363: | ||
}} | }} | ||
=== | ===Zuklappbare und nicht-zuklappbare gemischt=== | ||
<pre> | <pre> | ||
{{Navbox | {{Navbox | ||
| Zeile 384: | Zeile 386: | ||
}} | }} | ||
</pre> | </pre> | ||
resultiert in: | |||
{{Navbox | {{Navbox | ||
|1 ={{{1|}}} | |1 ={{{1|}}} | ||
| Zeile 406: | Zeile 408: | ||
}} | }} | ||
=== | ===Spalten=== | ||
<pre> | <pre> | ||
{{Navbox | {{Navbox | ||
| Zeile 418: | Zeile 420: | ||
}} | }} | ||
</pre> | </pre> | ||
resultiert in: | |||
{{Navbox | {{Navbox | ||
|1 ={{{1|}}} | |1 ={{{1|}}} | ||
| Zeile 429: | Zeile 431: | ||
}} | }} | ||
=== | ===Spalten und Standard-Zeilen gemischt=== | ||
<pre> | <pre> | ||
{{Navbox | {{Navbox | ||
| Zeile 462: | Zeile 464: | ||
}} | }} | ||
=== | ===Seiten Navbox=== | ||
{{Navbox | {{Navbox | ||
|1 ={{{1|}}} | |1 ={{{1|}}} | ||
| Zeile 488: | Zeile 490: | ||
</pre> | </pre> | ||
{{clear}} | {{clear}} | ||
== | |||
* This template is fairly | ==Technisches== | ||
* This template is fairly complex. Editing it requires a good understanding of parser functions and wiki syntax. | |||
* Auxiliary templates: | * Auxiliary templates: | ||
** {{tl|Navbox/aux}}: Merges various input parameters, calculates row/column counts for a given block and passes results to <nowiki>{{Navbox/aux2}}</nowiki> or <nowiki>{{Navbox/aux3}}</nowiki> (depending on the specified layout type). | ** {{tl|Navbox/aux}}: Merges various input parameters, calculates row/column counts for a given block and passes results to <nowiki>{{Navbox/aux2}}</nowiki> or <nowiki>{{Navbox/aux3}}</nowiki> (depending on the specified layout type). | ||
| Zeile 496: | Zeile 499: | ||
* Standardized documentation for templates based on this one: | * Standardized documentation for templates based on this one: | ||
** {{tl|Navbox/doc/standard}} | ** {{tl|Navbox/doc/standard}} | ||
Version vom 5. Juli 2011, 16:38 Uhr
| Diese Seite enthält Informationen zur Verwendung für Vorlage:Navbox. |
Meta-template for building navboxes. A navbox is a grouping of links used in multiple related articles to facilitate navigation between those articles.
Up to 8 blocks with up to 8 content & group fields each are supported, as well as displaying the rows in a column-based or horizontal layout and making groups collapsible. Each of these options can be specified for individual blocks or the whole navbox. In addition, navboxes built with this meta-template can be nested/displayed within each other. The template also supports displaying images to the left and/or right of individual blocks or the whole navbox.
Standard navboxes (i.e. those inserted at the bottom of an article) are collapsible and will be auto-collapsed by default (this can be changed by altering the autocollapse limit in MediaWiki:Common.js). Side navboxes are not collapsible by default and do not count towards this limit.
Benutzung
{{Navbox
|1 ={{{1|}}}
|editlink =Navbox example
|title =Examples in the ''Fallout'' world
|contentA1 =Links
}}
The box below allows you to create a new {{Navbox}} with the appropriate layout. Simply enter the name of the new navbox ("Template:Navbox" is automatically added) and click the "Create" button.
| Enter navbox name: |
<createbox> preload=Template:Create template/navbox prefix=Template:Navbox_ width=40 </createbox> |
Parameter
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.*).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.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.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.image size sets the size of image and imageleft size sets the size of <ocde>imageleft. Be careful not to make the images too large or you risk stretching and/or other visual oddities.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.image in px. For example, imageA size sets the size of <ocde>image A. Be careful not to make the images too large or you risk stretching and/or other visual oddities.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.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.,).
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
positionis set to "bottom" or not unspecified. - nocollapse means the navbox is not collapsible. This is the default setting if
positionis 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
optionparameter (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
optionparameter (see below) to "collapsed". - wraplinks: If set, line breaks can occur in the middle of links inside the navbox.
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.
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.
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.Style Parameter
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.
block cell. For example, blockF style applies to the cell of blockF etc.content cell. For example, contentE3 style applies to the cell of contentE3 etc.footer cell.group cell. For example, groupB7 style applies to the cell of groupB7 etc.header cell. For example, headerD style applies to the cell of headerD etc.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.image cell. For example, imageB style applies to the cell of imageB, imageleftC style affects the cell of imageleftC etc.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")
style applies to every cell in the whole navbox, style blocks applies to all content cells and so forth.styleA applies to all cells with an "A" in their name, such as blockA, contentA1, imageA etc.style contentsA applies to all content cells with an "A" in their name, such as contentA1, contentA2 etc.title cell.Beispiele
Einfache Box
{{Navbox
|1 ={{{1|}}}
|editlink =Navbox example
|title =Examples in the ''Fallout'' world
|contentA1 =Content A
}}
resultiert in:
|
Standard Box mit Gruppen, Blöcke und Köpfe
{{Navbox
|1 ={{{1|}}}
|editlink =Navbox example
|title =Examples in the ''Fallout'' world
|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:
| |||||||||||||||||||||||||||||||
Standard Box mit Gruppen, Blöcke und Bild
{{Navbox
|1 ={{{1|}}}
|editlink =Navbox example
|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:
| |||||||||||||||||||||||||||
Standard box with Gruppen, Blöcke and Blockbilder
{{Navbox
|1 ={{{1|}}}
|editlink =Navbox example
|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:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Zuklappbare Gruppen
{{Navbox
|1 ={{{1|}}}
|editlink =Navbox example
|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:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Zuklappbare und nicht-zuklappbare gemischt
{{Navbox
|1 ={{{1|}}}
|editlink =Navbox example
|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:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Spalten
{{Navbox
|1 ={{{1|}}}
|editlink =Navbox example
|title =Examples
|options =columns
|contentA1 =Content A1
|contentA2 =Content A2
|contentA3 =Content A3
}}
resultiert in:
|
Spalten und Standard-Zeilen gemischt
{{Navbox
|1 ={{{1|}}}
|editlink =Navbox example
|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:
| |||||||||||||||||||||||||||
| ||||||||||||||||||
{{Navbox
|1 ={{{1|}}}
|editlink =Navbox example
|title =Examples
|position =right
|options =columns
|headerA =Header A
|contentA1 =Content A1
|contentA2 =Content A2
|contentA3 =Content A3
}}
Technisches
- This template is fairly complex. Editing it requires a good understanding of parser functions and wiki syntax.
- Auxiliary templates:
- {{Navbox/aux}}: Merges various input parameters, calculates row/column counts for a given block and passes results to {{Navbox/aux2}} or {{Navbox/aux3}} (depending on the specified layout type).
- {{Navbox/aux2}}: Returns a whole block of standard rows according to options and specified cells.
- {{Navbox/aux3}}: Returns a whole block of columns according to options and specified cells.
- Standardized documentation for templates based on this one: