Gamepedia Help Wiki
K (1 Version importiert)
Magiczocker (Diskussion | Beiträge)
K
 
(5 dazwischenliegende Versionen von 3 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
  +
<noinclude>{{Übersetzen}}</noinclude>
 
{{doc/start}}
 
{{doc/start}}
  +
Meta-template for building navboxes. A navbox is a grouping of links used in multiple related articles to facilitate navigation between those articles.
== Usage ==
 
Please remove the parameters that are left blank.
 
   
  +
Based on [[wikipedia:Template:Navbox]], see documentation there.
<pre style="overflow: auto;">{{Navbox
 
| name = {{subst:PAGENAME}}{{subst:void|Don't change anything on this line. It will change itself when you save.}}
 
| title =
 
| listclass = hlist
 
| state = {{{state|}}}
 
   
  +
== Verwendung ==
| above =
 
  +
Blank template with commonly use options:
| image =
 
  +
<pre style=display:table>
 
 
{{Navbox
| group1 =
 
 
| name = Navbox/doc
| list1 =
 
 
| state = uncollapsed
 
| group2 =
+
| title = title
| list2 =
+
| group1 = Group1
 
| list1 = List1
<!-- ... -->
 
| group20 =
+
| group2 = Group2
| list20 =
+
| list2 = List2
  +
| group3 = Group3
 
| below =
+
| list3 = List3
 
| group4 = Group4
 
| list4 = List4
 
}}
 
}}
 
</pre>
 
</pre>
   
  +
==Parameters==
== Parameter list ==
 
  +
; name: Template name.
{{Navbox
 
 
; title: text in the title bar.
| name = Navbox/doc
 
 
; state: controls when a navbox is expanded or collapsed. (use "mw-collapsed" to set the navbox to collapsed)
| state = uncollapsed
 
 
; above/below: optional text to appear above or below the group/list section.
| title = {{{title}}}
 
  +
; group(n):
| above = {{{above}}}
 
  +
; listn(n):
| image = {{{image}}}
 
| group1 = {{{group1}}}
 
| list1 = {{{list1}}}
 
| group2 = {{{group2}}}
 
| list2 = {{{list2}}}
 
| list3 = {{{list3}}} ''without {{{group3}}}''
 
| group4 = {{{group4}}}
 
| list4 = {{{list4}}}
 
| below = {{{below}}}
 
}}
 
   
  +
==Styles==
The navbox uses lowercase parameter names, as shown in the box (''above''). The required ''name'' and ''title'' will create a one-line box if other parameters are omitted.
 
  +
Styles are generally advised against, to maintain consistency among templates([[MediaWiki:Hydradark.css]] should be used instead or applied general here); but the option to modify styles parameters are given given below, for specific customization or testing purposes:
   
  +
{{cols|3|
Notice "group1" (etc.) is optional, as are sections named "above/below".
 
  +
*style
{{clear}}
 
  +
*basestyle
The basic and most common parameters are as follows (see [[#Parameter descriptions|below]] for the full list):
 
  +
*titlestylex
 
  +
*groupstyle
: <code>name</code> – the name of the template.
 
  +
*groupnstyle
: <code>title</code> – text in the title bar, such as: <nowiki>[[Widget stuff]]</nowiki>.
 
  +
*liststyle
: <code>listclass</code> – a CSS class for the list cells, usually <code>hlist</code> for horizontal lists. Alternatively, use bodyclass for the whole box.
 
  +
*listnstyle
: <code>state</code> – controls when a navbox is expanded or collapsed.
 
  +
*listpadding
: <code>titlestyle</code> – a CSS style for the title-bar, such as: <code>background: gray;</code>
 
  +
*oddstyle
: <code>groupstyle</code> – a CSS style for the group-cells, such as: <code>background: #eee;</code>
 
  +
*evenstyle
: <code>above</code> – text to appear above the group/list section (could be a list of overall wikilinks).
 
  +
*abovestyle
: <code>image</code> – an optional right-side image, coded as the whole image. Typically it is purely decorative, so it should be coded as <code><nowiki>[[File:</nowiki><var>XX</var><nowiki>.jpg|80px|link=|alt=]]</nowiki></code>.
 
  +
*belowstyle
: <code>imageleft</code> – an optional left-side image (code the same as the "image" parameter).
 
  +
*imagestyle
: <code>group<sub>n</sub></code> – the left-side text before list-n (if group-n omitted, list-n starts at left of box).
 
  +
*imageleftstyle
: <code>list<sub>n</sub></code> – text listing wikilinks using a [[wikipedia:Help:Lists|wikilist]] format.
 
 
}}
: <code>below</code> – optional text to appear below the group/list section.
 
 
== Parameter descriptions ==
 
The following is a complete list of parameters for using {{tl|Navbox}}. In most cases, the only required parameters are <code>name</code>, <code>title</code>, and <code>list1</code>.
 
 
=== Setup parameters ===
 
:; ''name''
 
:: The name of the template, which is needed for the "V&nbsp;• T&nbsp;• E" ("View&nbsp;• Talk&nbsp;• Edit") links to work properly on all pages where the template is used. You can enter <code><nowiki>{{subst:PAGENAME}}</nowiki></code> for this value as a shortcut. The name parameter is only mandatory if a <code>title</code> is specified, and the <code>border</code> parameter is not set, and the <code>navbar</code> parameter is not used to disable the navbar.
 
:; ''state'' <span style="font-weight:normal;">[<code>autocollapse, collapsed, expanded, plain, off</code>]</span>
 
:* Defaults to <code>autocollapse</code>. A navbox with <code>autocollapse</code> will start out collapsed if there are two or more tables on the same page that use other collapsible tables. Otherwise, the navbox will be expanded. For the technically minded, see [[MediaWiki:Hydradark.js]].
 
:* If set to <code>collapsed</code>, the navbox will always start out in a collapsed state.
 
:* If set to <code>expanded</code>, the navbox will always start out in an expanded state.
 
:* If set to <code>plain</code>, the navbox will always be expanded with no [hide] link on the right, and the title will remain centered (by using padding to offset the <small>V&nbsp;• T&nbsp;• E</small> links).
 
:* If set to <code>off</code>, the navbox will always be expanded with no [hide] link on the right, but no padding will be used to keep the title centered. This is for advanced use only; the "plain" option should suffice for most applications where the [show]/[hide] button needs to be hidden.
 
: To show the box when standalone (non-included) but then auto-hide contents when in an article, put "expanded" inside <tt>&lt;noinclude|&gt;</tt>...<tt>&lt;/noinclude|&gt;</tt> tags. This setting will force the box visible when standalone (even when followed by other boxes), displaying "[hide]", but then it will auto-collapse the box when stacked inside an article:
 
:: <code><nowiki>| state =&nbsp;</nowiki></code><tt>&lt;noinclude|&gt;</tt>expanded<tt>&lt;/noinclude|&gt;</tt>
 
: Often times, editors will want a default initial state for a navbox, which may be overridden in an article. Here is the trick to do this:
 
:* In your intermediate template, create a parameter also named "state" as a pass-through like this:
 
:: <code><nowiki>| state = {{{state<includeonly>|your_desired_initial_state</includeonly>}}}</nowiki></code>
 
:* The <tt>&lt;includeonly&gt;</tt><code>|</code> will make the template expanded when viewing the template page by itself.
 
:; ''navbar''
 
:: If set to <code>plain</code>, the <span style="font-size: 88%;">V&nbsp;• T&nbsp;• E</span> links on the left side of the titlebar will not be displayed, and padding will be automatically used to keep the title centered. Use <code>off</code> to remove the <span style="font-size: 88%;">V&nbsp;• T&nbsp;• E</span> links, but not apply padding (this is for advanced use only; the "plain" option should suffice for most applications where a navbar is not desired). It is highly recommended that one not hide the navbar, in order to make it easier for users to edit the template, and to keep a standard style across pages.
 
:; ''border''
 
 
{{doc/end}}
 
{{doc/end}}
  +
<includeonly><!-- Vorlagen Kategorien/Interwikis hier -->
  +
[[en:Template:Navbox]]
  +
[[Kategorie:Navigationsvorlagen| ]]
  +
</includeonly><noinclude><!-- doc Kategorien/Interwikis hier -->
  +
[[en:Template:Navbox/doc]]
  +
</noinclude>

Aktuelle Version vom 30. August 2019, 19:56 Uhr


Die Übersetzung dieser Seite, von denen die Informationen aus dem englischen Gamepedia Help Wiki stammt, ist noch nicht vollständig. Hilf mit, durch das Übersetzen der Seite.

Template-info.svgDokumentation

Meta-template for building navboxes. A navbox is a grouping of links used in multiple related articles to facilitate navigation between those articles.

Based on wikipedia:Template:Navbox, see documentation there.

Verwendung

Blank template with commonly use options:

{{Navbox
| name = Navbox/doc
| state = uncollapsed
| title = title
| group1 = Group1
| list1  = List1
| group2 = Group2
| list2  = List2
| group3 = Group3
| list3 = List3
| group4 = Group4
| list4 = List4
}}

Parameters

name
Template name.
title
text in the title bar.
state
controls when a navbox is expanded or collapsed. (use "mw-collapsed" to set the navbox to collapsed)
above/below
optional text to appear above or below the group/list section.
group(n)
listn(n)

Styles

Styles are generally advised against, to maintain consistency among templates(MediaWiki:Hydradark.css should be used instead or applied general here); but the option to modify styles parameters are given given below, for specific customization or testing purposes:

  • style
  • basestyle
  • titlestylex
  • groupstyle
  • groupnstyle
  • liststyle
  • listnstyle
  • listpadding
  • oddstyle
  • evenstyle
  • abovestyle
  • belowstyle
  • imagestyle
  • imageleftstyle
Dies ist eine Dokumentationsseite, die in die Seite der Hauptvorlage eingefügt werden sollte. Für weitere Informationen siehe: Vorlage:Doc.