Skabelon:Navboks med sammenklappelige afsnit

Fra Wikipedia, den frie encyklopædi
Gå til: navigation, søg
Documentation icon Skabelondokumentation[vis] [rediger] [historik] [opfrisk]

De forskellige Navboks-skabeloner der omtales bygger på den grundlæggende {{Navboks}} som skulle være en oversættelse af den engelske Template:Navbox. Denne omplantning til dansk er imidlertid sket på en sådan måde at ikke alle eksempler blot kan overføres til dansk.

Den fornuftigste fremgangsmåde er derfor at finde nogle eksempler at modelere over og så blot bruge denne engelske vejledning som baggrundsmateriale.

Det er muligt at se et par eksempler herunder

Se også


This template produces a navigational template that has groups of relevant articles on a certain topic. All groups are hidden by default. However, with a parameter call, an individual group can be shown that has the other articles in the same group.

Usage / Brug[redigér wikikode]

Please remove the parameters that are left blank. The template currently supports up to 10 groups/lists but more can be added if needed. You should use a minimum of two groups/lists; otherwise, use {{Navbox}} instead.

{{Navboks med sammenklappelige afsnit
|navn = {{subst:PAGENAME}}
|status = 
|selected = {{{1|}}}

|titel = 
|titel_style = 
|gruppe_style = 
|billede = 

|gruppe1 = 
|abbr1 = 
|liste1 =

|gruppe2 = 
|abbr2 = 
|liste2 = 


|gruppe10 = 
|abbr10 = 
|liste10 = 

Parameters / Parametre[redigér wikikode]

Se også 
Skabelon:Navbox#Forskel mellem engelske og danske parametre

This template shares many common parameters with its sister templates {{Navbox}} and {{Navbox with columns}}. The common parameters are marked with a cross. Please refer to the documentation of {{Navbox}} for more in depth descriptions and examples of those parameters.

Setup parameters / Opsætning[redigér wikikode]

The name of the template. The name of this template, for example, is "Navboks med sammenklappelige afsnit".
state [autocollapse, uncollapsed, collapsed, plain, off]
The initial state of the show/hide feature for the main title. See {{Navbox}} for more information. Does not affect display or hiding of group items, see staten, below.
Possible values are plain, off, and the default value of blank. See {{Navbox}} for more information.
Possible values are child, none, and the default value of blank. Set to child if you wish to use the navbox inside of another navbox; with this option, the child navbox is borderless and fits snuggly inside of its parent navbox. The parent navbox may be the list area of {{Navbox}}, the columns of a {{Navbox with columns}}, or a list area of {{Navboks med sammenklappelige afsnit}}. See {{Navbox}} for more information and examples.

Basic data parameters / De grundlæggende dataparametre[redigér wikikode]

The title of the template, displayed centered in the titlebar at the top of the template.
Text or other elements to appear above groups/lists.
Image to the right of all of the groups/lists.
Image to the left of all of the groups/lists.
Text or other elements to appear below the groups/lists.

Group/list parameters / Parametre til grupper og lister[redigér wikikode]

The title of each section.
The content/wikilinks that will be shown in the group. Use dots or bullets as separators (see the See also section). A {{Navbox}} or {{Navbox with columns}} can optionally be used here with its border = child parameter set. If this is done, leave the corresponding groupn blank, as the child navbox will already provide the collapsible feature.
This is the abbreviation of the group. See selected parameter below to see how to use this parameter. This parameter is optional, but recommended.
If the value of selected equals the value of abbrn, then listn is uncollapsed and all other lists are collapsed. If selected is left blank, or if it does not match any abbrn, then all groups are collapsed. Usually this parameter should be set to {{{1|}}}. Since this template is a base template for others, there has to be a way to pass the group parameter from the article, to the secondary template to this one.
staten [autocollapse, uncollapsed, collapsed, plain, off]
The initial collapsible state of listn. Set to collapsed by default. Overridden to uncollapsed if selected equals abbrn.
An image to appear in the listn content area on the right side.
An image to appear in the listn content area on the left side.

Style parameters / Parametre til udformning af stilen[redigér wikikode]

CSS style/s to apply to the entire template
CSS style/s to apply to titlebar; usually background:color. The color of wikilink text must be manually changed using span tags. For example use title = [[Scouting|<span style="color:ivory;">Scouting</span>]] to change the color of the link to ivory. The [show]/[hide] button and the vde link button use the color set in the titlestyle parameter. Here is an example of setting the titlestyle:
titlestyle = background:darkgreen;color:ivory;
CSS style/s to apply to the above and below parameters, respectively.
CSS style/s to apply to the title, above, below, and groupn parameters, all at the same time.
CSS style/s to apply to the image parameter. Does not get applied to the imagen parameters.
CSS style/s to apply to the imageleft parameter. Does not get applied to the imageleftn parameters.
CSS style/s to apply to all group heading parameters. Visit this website to get a lighter color similar to the title background color. Example:
groupstyle = background:lightgreen;
CSS style/s to apply to a specific group heading; overrides any CSS styles set in groupstyle.
CSS style/s to apply to all list content parameters.
CSS style/s to apply to specific list content parameters; overrides any CSS styles set in liststyle.
Padding to have in each list cell; defaults to 0.25em on the left/right and 0em on the top/bottom.

Examples / Eksempler[redigér wikikode]

Basic example / Et almindeligt eksempel[redigér wikikode]

{{Navboks med sammenklappelige afsnit
|navn = University of Michigan
|titel = [[University of Michigan|<span style="color:#FFD700;">The University of Michigan, Ann Arbor</span>]]
|titel_style = background:#00008B;color:#FFD700;
|gruppe_style = background:#FFD700;color:#00008B;
|billede = 
|selected = {{{1|}}}
|status = {{{1|uncollapsed}}}

|gruppe1 = [[University of Michigan#Academic profile|<span style="color:#00008B;">Academics</span>]]
|abbr1 = academics
|liste1 = [[University of Michigan College of Engineering|College of Engineering]]{{•}} [[University of Michigan College of Literature, Science, and the Arts|College of Literature, Science and the Arts]]{{•}} [[Gerald R. Ford School of Public Policy]]{{•}} [[University of Michigan Law School|Law School]]{{•}} [[University of Michigan Health System|Medical School]]{{•}} [[Ross School of Business]]{{•}} [[University of Michigan School of Education|School of Education]]{{•}} [[University of Michigan School of Information|School of Information]]{{•}} [[University of Michigan School of Music, Theatre & Dance|School of Music, Theatre & Dance]]{{•}}[[University of Michigan School of Natural Resources and Environment|School of Natural Resources and Environment]]{{•}} [[University of Michigan School of Public Health|School of Public Health]]{{•}} [[Taubman College of Architecture and Urban Planning]]

|gruppe2 = [[Michigan Wolverines|<span style="color:#00008B;">Athletics</span>]]
|abbr2 = athletics
|liste2 = [[Michigan Stadium]]{{•}} [[Crisler Arena]]{{•}} [[Yost Ice Arena]]{{•}} [[Michigan Wolverines]]{{•}} [[Michigan Wolverines football|Football]]{{•}} [[Michigan-Ohio State rivalry|UM-OSU Rivalry]]{{•}} [[Little Brown Jug (football)|Little Brown Jug]]{{•}} [[Paul Bunyan Trophy]]{{•}} [[Cold War (ice hockey)|Cold War]]

|gruppe3 = Campus
|abbr3 = campus
|liste3 = [[Angell Hall Observatory]]{{•}} [[Burton Tower]]{{•}} [[The Diag]]{{•}} [[David M. Dennison Building|Dennison Building]]{{•}} [[Gerald R. Ford Presidential Library]]{{•}} [[Hill Auditorium]]{{•}} [[Lurie Tower]]{{•}} [[Matthaei Botanical Gardens]]{{•}} [[Michigan Union]]{{•}} [[Museums at the University of Michigan|Museums]]{{•}} [[Nichols Arboretum]]{{•}} [[University of Michigan Health System|UM Health System]]{{•}} [[University of Michigan Library|University Library]]


Nesting other Navbox forms / Forskellige typer navbokse inden i hinanden[redigér wikikode]

{{Navboks}}, {{Navboks med sammenklappelige afsnit}} og {{Navboks med kolonner}}

This example shows {{Navbox}}, {{Navboks med sammenklappelige afsnit}} and {{Navbox with columns}} all working together. Press the edit button for the section to view the code. Note that each of the child navboxes has the first parameter set to child
Kontrollér at de artikler, som linkes til, har denne skabelon.

Nesting Navboxes to get more groups/lists[redigér wikikode]

En metode til hele alfabetet (her det engelske)

You can conveniently nest Navboxes, including {{Navboks med sammenklappelige afsnit}}, to get an unlimited number of groups/lists. The following example uses one instance of {{Navboks med sammenklappelige afsnit}} to get the first 10 collapsible groups, a nested instance to get the next 10, and another nested instance to get the last 6. See the code to learn how it works. It is fairly simple to extend this to as many groups/lists as you like:

Kontrollér at de artikler, som linkes til, har denne skabelon.
{{Navboks med sammenklappelige afsnit
|navn = {{PAGENAME}}
|status = uncollapsed
|titel = Titel
|selected = {{{1|}}}

|gruppe1 = A
|liste1 = liste A
|gruppe2 = B
|liste2 = liste B
|gruppe3 = C
|liste3 = liste C
|gruppe4 = D
|liste4 = liste D
|gruppe5 = E
|liste5 = liste E
|gruppe6 = F
|liste6 = liste F
|gruppe7 = G
|liste7 = liste G
|gruppe8 = H
|liste8 = liste H
|gruppe9 = I
|liste9 = liste I

|liste10 = {{Navboks med sammenklappelige afsnit|child
  |selected = {{{1|}}}

  |gruppe1 = J
  |liste1 = liste J
  |gruppe2 = K
  |liste2 = liste K
  |gruppe3 = L
  |liste3 = liste L
  |gruppe4 = M
  |liste4 = liste M
  |gruppe5 = N
  |liste5 = liste N
  |gruppe6 = O
  |liste6 = liste O
  |gruppe7 = P
  |liste7 = liste P
  |gruppe8 = Q
  |liste8 = liste Q
  |gruppe9 = R
  |liste9 = liste R

|liste10 = {{Navboks med sammenklappelige afsnit|child
  |selected = {{{1|}}}

  |gruppe1 = S
  |liste1 = liste S
  |gruppe2 = T
  |liste2 = liste T
  |gruppe3 = U
  |liste3 = liste U
  |gruppe4 = V
  |liste4 = liste V
  |gruppe5 = W
  |liste5 = liste W
  |gruppe6 = X
  |liste6 = liste X
  |gruppe7 = Y
  |liste7 = liste Y
  |gruppe8 = Z
  |liste8 = liste Z



See also / Se også[redigér wikikode]

  • {{Navboks}} - Den grundlæggende navboks.
  • {{Navboks med kolonner}} - Sister template that provides columns in a navbox
  • {{Nowrap begin}} - Provides an explanation of the preferred method of using bullets or pipes to delimit list items.
Navigation templates comparison
Sammenklappelige Overskrift farve Billede Grupper Style (body)
{{Navboks}} collapsible navboks Left/right of body Ja Ja
{{Navboks med sammenklappelige afsnit}} collapsible navboks Left/right of body and/or in each list Ja Ja
{{Navboks med kolonner}} collapsible navboks Left/right of columns Nej Ja
Collapsible attributes
Type CSS classes JavaScript Collapses when Custom
initial state
Sammenklappelige tableller collapsible Defined in Common.js 2 or more autocollapse on page Ja Ja