টেমপ্লেট:Navbox subgroup

উইকিসংকলন থেকে
টেমপ্লেট নথি[দেখুন] [সম্পাদনা] [ইতিহাস] [শোধন]

টেমপ্লেট:Esoteric

This template is designed to be used with {{Navbox}} or other navigational templates that allow creating lists of links with groups headers or titles. This template allows the creation of subgroups that can be assigned to a list item within {{Navbox}}. A subgroup may contain up to 20 list items.

Blank template[সম্পাদনা]

{{Navbox subgroup
| groupstyle = 
| liststyle  = 

| group1 = 
| list1  = 
| group2 = 
| list2  = 
...
| group20 = 
| list20  = 
}}

Parameters[সম্পাদনা]

This template employs all parameters of {{Navbox}}. Please see the documentation there for more complete descriptions. In fact, the only differences between this template and {{Navbox}} are as follows:

  • The border parameter defaults to "child"
  • The group padding defaults to 0.75em on the left/right, and can only be changed with the grouppadding parameter. This is done to prevent the Internet Explorer box model bug from affecting the width of groups.

Everything else is exactly the same as {{Navbox}}.

Only the most common parameters are listed below.

Cells[সম্পাদনা]

listn
(i.e. list1, list2, ... list20) The body of the template, usually a list of links. Format is inline. At least one list parameter is required; each additional list is displayed in a separate row of the table. Each listn may be preceded by a corresponding groupn parameter, if provided (see below). The background color of the list items (and the entire table) defaults to transparent, therefore it displays the same background color used in the parent navigation box.
groupn
(i.e. group1, group2, ..., group20) If specified, text appears in a header cell displayed to the left of listn. If omitted, listn uses the full width of the table. The background color defaults to #e6e6ff, but can be changed via the groupstyle parameter (see below).

Styles[সম্পাদনা]

bodystyle
Specifies CSS styles to apply to the template body. Examples:
background:#nnnnnn;
text-align:[right/center/left/justified];
groupstyle
CSS styles to apply to the groupn cells. This option overrides any styles that are applied to the entire table. Examples:
background:#nnnnnn;
text-align:[left/center/right];
vertical-align:[top/middle/bottom];
white-space:nowrap;
grouppadding
CSS style to specify group padding. Should usually be specified using em units. It is recommended to leave this parameter alone and use the default padding. Examples:
grouppadding = 0em 1em; (1em on left/right, 0em on top/bottom)
grouppadding = 0em 0.5em 0em 1em; (0em top, 0.5em right, 0em bottom, 1em left)
liststyle
CSS styles to apply to all lists. Overridden by the oddstyle and evenstyle parameters (if specified) below.
oddstyle
evenstyle
CSS styles to apply to the odd-numbered list items (list1, list3, etc) or even-numbered list items (list2, list4, etc), respectively. Typically used to set background color (background:#nnnnnn;) in order to achieve an alternating background color between odd and even-numbered lists.
evenodd [swap, even, odd, off]
If set to swap, then the automatic striping of even and odd rows is reversed. Normally, even rows get a light gray background for striping; when this parameter is used, the odd rows receive the gray striping instead of the even rows. Setting to even or odd sets all rows to have that striping color. Setting to off disables automatic row striping. NOTE: Due to system limitations, do not use a semi-colon to close this command.

Setting the width of groups[সম্পাদনা]

If multiple {{Navbox subgroup}} templates are used inside of a parent {{Navbox}}, it generally looks better if the width of the groups matches up. In order to do this, one must set the groupwidth parameter:

groupwidth = 10em

An alternative way is to set the groupstyle parameters to contain the desired width, and the liststyle parameters to have width:auto (due to HTML/CSS reasons). For example, place the following code in each {{Navbox subgroup}} to adjust the widths:

groupstyle = width:10em;
liststyle = width:auto;
  • NOTE: For the groupstyle widths to work, you must set the liststyle width to "auto".

If you also use the image or imageleft parameters, then you will most likely also need to set their width manually using the imagestyle and imageleftstyle parameters.

Examples[সম্পাদনা]

Example 1[সম্পাদনা]

The following is an example of Navbox subgroup used within a Navbox template.

{{Navbox
|name = ইউটিসি সময় অফসেট
|title = [[w:সার্বজনীন সমন্বিত সময়]] (ইউটিসি)
|listclass = hlist
|group1 = [[w:মান সময়]] এবং <br /> [[w:দিবালোক সংরক্ষণ সময়|দিবালোক সংরক্ষণ সময়ের]] (ডিএসটি)<br /> জন্য [[w:ইউটিসি অফসেট]]<br />''ইটালিক: ঐতিহাসিক বা বেসরকারী''
|list1 = {{Navbox subgroup
 |group1 = [[w:১৮০তম মধ্যরেখা|১৮০°]] থেকে < [[w:৯০তম পশ্চিম মধ্যরেখা|৯০°প]]
 |list1 = · [[w:ইউটিসি−১২:০০|−১২:০০]] · [[w:ইউটিসি−১১:০০|−১১:০০]] · ''[[w:ইউটিসি−১০:৩০|−১০:৩০]]'' · [[w:ইউটিসি−১০:০০|−১০:০০]] · [[w:ইউটিসি−০৯:৩০|−০৯:৩০]] · [[w:ইউটিসি−০৯:০০|−০৯:০০]] · ''[[w:ইউটিসি−০৮:৩০|−০৮:৩০]]'' · [[w:ইউটিসি−০৮:০০|−০৮:০০]] · [[w:ইউটিসি−০৭:০০|−০৭:০০]]
 |group2 = [[w:৯০তম পশ্চিম মধ্যরেখা|৯০°প]] থেকে < [[w:IERS Reference Meridian|০°]]
 |list2 = *[[w:ইউটিসি−০৬:০০|−০৬:০০]] · [[w:ইউটিসি−০৫:০০|−০৫:০০]] · [[w:ইউটিসি−০৪:৩০|−০৪:৩০]] · [[w:ইউটিসি−০৪:০০|−০৪:০০]] · [[w:ইউটিসি−০৩:৩০|−০৩:৩০]] · [[w:ইউটিসি−০৩:০০|−০৩:০০]] · [[w:ইউটিসি−০২:৩০|−০২:৩০]] · [[w:ইউটিসি−০২:০০|−০২:০০]] · [[w:ইউটিসি−০১:০০|−০১:০০]] · ''[[w:ইউটিসি−০০:৪৪|−০০:৪৪]]'' · ''[[w:ইউটিসি−০০:২৫:২১|−০০:২৫:২১]]''
 |group3 = [[w:IERS Reference Meridian|০°]] থেকে < [[w:৯০তম মধ্যরেখা পূর্ব|৯০°পূ]]
 |list3 = *[[w:ইউটিসি±০০:০০|±০০:০০]] · ''[[w:ইউটিসি+০০:২০|+০০:২০]]'' · ''[[w:ইউটিসি+০০:৩০|+০০:৩০]]'' · [[w:ইউটিসি+০১:০০|+০১:০০]] · ''[[w:ইউটিসি+০১:২৪|+০১:২৪]]'' · ''[[w:ইউটিসি+০১:৩০|+০১:৩০]]'' · [[w:ইউটিসি+০২:০০|+০২:০০]] · ''[[w:ইউটিসি+০২:৩০|+০২:৩০]]'' · [[w:ইউটিসি+০৩:০০|+০৩:০০]] · [[w:ইউটিসি+০৩:৩০|+০৩:৩০]] · [[w:ইউটিসি+০৪:০০|+০৪:০০]] · [[w:ইউটিসি+০৪:৩০|+০৪:৩০]] · ''[[w:ইউটিসি+০৪:৫১|+০৪:৫১]]'' · [[w:ইউটিসি+০৫:০০|+০৫:০০]] · [[w:ইউটিসি+০৫:৩০|+০৫:৩০]] · ''[[w:ইউটিসি+০৫:৪০|+০৫:৪০]]'' · [[w:ইউটিসি+০৫:৪৫|+০৫:৪৫]]
 |group4 = [[w:৯০তম মধ্যরেখা পূর্ব|৯০°পূ]] থেকে < [[w:১৮০তম মধ্যরেখা|১৮০°]]
 |list4 = *[[w:ইউটিসি+০৬:০০|+০৬:০০]] · [[w:ইউটিসি+০৬:৩০|+০৬:৩০]] · [[w:ইউটিসি+০৭:০০|+০৭:০০]] · ''[[w:ইউটিসি+০৭:২০|+০৭:২০]]'' · ''[[w:ইউটিসি+০৭:৩০|+০৭:৩০]]'' · [[w:ইউটিসি+০৮:০০|+০৮:০০]] · ''[[w:ইউটিসি+০৮:৩০|+০৮:৩০]]'' · [[w:ইউটিসি+০৮:৪৫|+০৮:৪৫]] · [[w:ইউটিসি+০৯:০০|+০৯:০০]] · [[w:ইউটিসি+০৯:৩০|+০৯:৩০]] · ''[[w:ইউটিসি+০৯:৪৫|+০৯:৪৫]]'' · [[w:ইউটিসি+১০:০০|+১০:০০]] · [[w:ইউটিসি+১০:৩০|+১০:৩০]] · [[w:ইউটিসি+১১:০০|+১১:০০]] · [[w:ইউটিসি+১১:৩০|+১১:৩০]]
 |group5 = ([[w:১৮০তম মধ্যরেখা|১৮০°]] থেকে < [[w:৯০তম পশ্চিম মধ্যরেখা|৯০°প]])
 |list5 = *[[w:ইউটিসি+১২:০০|+১২:০০]] · [[w:ইউটিসি+১২:৪৫|+১২:৪৫]] · [[w:ইউটিসি+১৩:০০|+১৩:০০]] · [[w:ইউটিসি+১৩:৪৫|+১৩:৪৫]] · [[w:ইউটিসি+১৪:০০|+১৪:০০]]
 }}
|group2 = [[w:সময় অঞ্চল]] তথ্যসূত্র
|list2 = [[w:টিজেড ডেটাবেস]]
|group3 = [[w:সময় অঞ্চলের তালিকা]]
|list3 = · [[w:দেশ অনুযায়ী সময় অঞ্চলের তালিকা|দেশ অনুযায়ী সময় অঞ্চল]] · [[w:ইউটিসি অফসেট অনুযায়ী সময় অঞ্চলের তালিকা|ইউটিসি অফসেট অনুযায়ী সময় অঞ্চল]] · [[w:টিজেড ডেটাবেস সময় অঞ্চলের তালিকা|টিজেড ডেটাবেস সময় অঞ্চল]] · [[w:সামরিক সময় অঞ্চলের তালিকা|সামরিক সময় অঞ্চল]] · [[w:সময় অঞ্চলের সংহ্মিপ্ত তালিকা|সময় অঞ্চল সংহ্মিপ্ত]] · [[w:দেশ অনুযায়ী সময় সংরক্ষণ দিবালোক]]
}}

Example 2[সম্পাদনা]

This example implements horizontal group headings by assigning the headings to list1 and list3 and the links to list2 and list4), then using list1style and list3style to set the background color of the headings.

{{Navbox
| state = expanded
| name  = Roman Emperors
| title = Roman Emperors
| group1 = Crisis 235 AD - 284 AD
| list1  = [[w:en:Maximinus Thrax]] · [[w:en:Gordian I]] · [[w:en:Gordian II]] · [[w:en:Pupienus]] and [[w:en:Balbinus]] · [[w:en:Gordian III]] · [[w:en:Philip the Arab]] · [[w:en:Decius]] · [[w:en:Trebonianus Gallus]] · [[w:en:Aemilianus]] · [[w:en:Valerian (emperor)|Valerian]] · [[w:en:Gallienus]] · [[w:en:Claudius II]] · [[w:en:Quintillus]] · [[w:en:Aurelian]] · [[w:en:Marcus Claudius Tacitus]] · [[w:en:Florianus]] · [[w:en:Marcus Aurelius Probus|Probus]] · [[w:en:Carus]] · [[w:en:Numerian]] · [[w:en:Carinus]]
| group2 = Dominate
| list2  = 
  {{Navbox subgroup
   |list1style = background:#ddf;
   |list1 = '''284 AD - 395 AD'''
   |list2 = [[w:en:Diocletian]] · [[w:en:Maximian]] · [[w:en:Constantius Chlorus|Constantius I]] · [[w:en:Galerius]] · [[w:en:Flavius Valerius Severus|Severus II]] · [[w:en:Maxentius]] · [[w:en:Maximinus]] · [[w:en:Licinius]] · [[w:en:Constantine I]] · [[w:en:Constantine II (emperor)|Constantine II]] · [[w:en:Constans|Constans I]] · [[w:en:Constantius II]] · [[w:en:Julian the Apostate]] · [[w:en:Jovian (Emperor)|Jovian]] · [[w:en:Valentinian I]] · [[w:en:Valens]] · [[w:en:Gratian]] · [[w:en:Valentinian II]] · [[w:en:Eugenius]] · [[w:en:Theodosius I]]
   |list3style = background:#ddf;
   |list3 = '''Western Empire (393 AD - 476 AD)'''
   |list4 = [[w:en:Honorius (emperor)|Honorius]] · [[w:en:Constantius III]] · [[w:en:Joannes]] · [[w:en:Valentinian III]] · [[w:en:Petronius Maximus]] · [[w:en:Avitus]] · [[w:en:Majorian]] · [[w:en:Libius Severus]] · [[w:en:Anthemius]] · [[w:en:Olybrius]] · [[w:en:Glycerius]] · [[w:en:Julius Nepos]] · [[w:en:Romulus Augustus]]
  }}
}}

See also[সম্পাদনা]

  • {{Navbox}} – Basic navbox
  • {{Navbox with columns}} – Allows columns instead of groups/lists
  • {{Navbox with collapsible groups}} – Another variation.
  • Wikipedia:Line break handling – The how-to guide about how to handle word wraps (line breaks) on Wikipedia, such as the wrapping of the link lists used in navboxes.
  • {{Nowrap begin}} – The recommended format for adding bullets, pipes, or dashes between list items. The page describes how to go about using them with proper wrapping.
  • {{Nobold}} – To display text at normal font-weight within a context where the default font-weight is bold, e.g. header cells in tables.
Navigation templates comparison
Collapsible Header color Image Groups Style (body)
parameter/s
Examples
{{Navbox}} collapsible navbox Left/right of body Yes Yes
{{Navbox with collapsible groups}} collapsible navbox Left/right of body and/or in each list Yes Yes
{{Navbox with columns}} collapsible navbox Left/right of columns No Yes
{{Navbox years}} collapsible navbox No No No
Collapsible attributes
Type CSS classes Javascript Collapses when Custom
initial state
Nesting
Collapsible tables collapsible Defined in Common.js 2 or more autocollapse on page Yes Yes