http://www.arabsciencepedia.org/w/index.php?title=%D9%82%D8%A7%D9%84%D8%A8:Navbox_subgroup/%D8%B4%D8%B1%D8%AD&feed=atom&action=historyقالب:Navbox subgroup/شرح - تاريخ المراجعة2024-03-29T04:39:14Zتاريخ التعديل لهذه الصفحة في الويكيMediaWiki 1.39.3http://www.arabsciencepedia.org/w/index.php?title=%D9%82%D8%A7%D9%84%D8%A8:Navbox_subgroup/%D8%B4%D8%B1%D8%AD&diff=19256&oldid=prevإدارة الموسوعة 1: مراجعة واحدة2012-08-21T10:36:09Z<p>مراجعة واحدة</p>
<p><b>صفحة جديدة</b></p><div><includeonly>{{template doc page transcluded}} {{Esoteric}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude><br />
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --><br />
<br />
This template is designed to be used with {{tl|Navbox}} or other [[Wikipedia:Navigational templates|navigational template]]s 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 {{tl|Navbox}}. A subgroup may contain up to 20 list items.<br />
<br />
== Blank template ==<br />
<pre><br />
{{Navbox subgroup<br />
| groupstyle = <br />
| liststyle = <br />
<br />
| group1 = <br />
| list1 = <br />
| group2 = <br />
| list2 = <br />
...<br />
| group20 = <br />
| list20 = <br />
}}<br />
</pre><br />
<br />
== Parameters ==<br />
This template employs all parameters of {{t1|Navbox}}. Please see the documentation there for more complete descriptions. In fact, the only differences between this template and {{t1|Navbox}} are as follows:<br />
*The border parameter defaults to "child"<br />
*The group padding defaults to 0.75em on the left/right, and can only be changed with the <code>grouppadding</code> parameter. This is done to prevent the [[Internet Explorer box model bug]] from effecting the width of groups.<br />
Everything else is ''exactly'' the same as {{t1|Navbox}}.<br />
<br />
Only the most common parameters are listed below.<br />
=== Cells ===<br />
:; ''list<sub>n</sub>''<br />
:: (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 ''list<sub>n</sub>'' may be preceded by a corresponding ''group<sub>n</sub>'' parameter, if provided (see below). The background color of the list items (and the entire table) defaults to <code>transparent</code>, therefore it displays the same background color used in the parent navigation box.<br />
<br />
:; ''group<sub>n</sub>''<br />
:: (i.e. ''group1'', ''group2'', ..., ''group20'') If specified, text appears in a header cell displayed to the left of ''list<sub>n</sub>''. If omitted, ''list<sub>n</sub>'' uses the full width of the table. The background color defaults to <code><span style="background:#e6e6ff; color:black;">#e6e6ff</span></code>, but can be changed via the ''groupstyle'' parameter (see below).<br />
<br />
=== Styles ===<br />
:; ''bodystyle''<br />
:: Specifies [[صفحات الطرز المتراصة|CSS]] styles to apply to the template body. Examples:<br />
::: <code>background:#''nnnnnn'';</code><br />
::: <code>text-align:[''right/center/left/justified''];</code><br />
<br />
:; ''groupstyle''<br />
:: CSS styles to apply to the ''group<sub>n</sub>'' cells. This option overrides any styles that are applied to the entire table. Examples:<br />
::: <code>background:#''nnnnnn'';</code><br />
::: <code>text-align:[''left/center/right''];</code><br />
::: <code>vertical-align:[''top/middle/bottom''];</code><br />
::: <code>white-space:nowrap;</code><br />
<br />
:; ''grouppadding''<br />
:: 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:<br />
::: <code>grouppadding = 0em 1em;</code> (1em on left/right, 0em on top/bottom)<br />
::: <code>grouppadding = 0em 0.5em 0em 1em;</code> (0em top, 0.5em right, 0em bottom, 1em left)<br />
<br />
:; ''liststyle''<br />
:: CSS styles to apply to all lists. Overridden by the ''oddstyle'' and ''evenstyle'' parameters (if specified) below.<br />
<br />
:; ''oddstyle''<br />
:; ''evenstyle''<br />
:: 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 (<code>background:#''nnnnnn'';</code>) in order to achieve an alternating background color between odd and even-numbered lists.<br />
<br />
:; ''evenodd'' <span style="font-weight:normal;"><code>[swap, even, odd, off]</code></span><br />
:: If set to <code>swap</code>, 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 <code>even</code> or <code>odd</code> sets all rows to have that striping color. Setting to <code>off</code> disables automatic row striping. NOTE: Due to system limitations, do '''not''' use a semi-colon to close this command. <br />
<br />
==Setting the width of groups==<br />
If multiple {{t1|Navbox subgroup}} templates are used inside of a parent {{t1|Navbox}}, it generally looks better if the width of the groups matches up. In order to do this, one must set the <code>groupstyle</code> parameters to contain the desired width, and the <code>liststyle</code> parameters to have width:auto (due to HTML/CSS reasons). For example, place the following code in each {{t1|Navbox subgroup}} to adjust the widths:<br />
:<code>groupstyle = width:10em;</code><br />
:<code>liststyle = width:auto;</code><br />
<br />
If you also use the <code>image</code> or <code>imageleft</code> parameters, then you will most likely also need to set their width manually using the <code>imagestyle</code> and <code>imageleftstyle</code> parameters.<br />
<br />
==Examples==<br />
=== Example 1 ===<br />
The following is an example of ''Navbox subgroup'' used within a ''Navbox'' template.<br />
<br />
{{Navbox<br />
| state = uncollapsed<br />
| name = Protected Areas of Colorado<br />
| title = Protected Areas of Colorado<br />
| group1 = National Park Service<br />
| list1 =<br />
{{Navbox subgroup<br />
| group1 = National Parks<br />
| list1 = [[Black Canyon of the Gunnison National Park|Black Canyon of the Gunnison]]{{•}} [[Great Sand Dunes National Park and Preserve|Great Sand Dunes]]{{•}} [[Mesa Verde National Park|Mesa Verde]]{{•}} [[Rocky Mountain National Park|Rocky Mountain]]<br />
| group2 = National Monuments<br />
| list2 = [[Colorado National Monument|Colorado]]{{•}} [[Florissant Fossil Beds National Monument|Florissant Fossil Beds]]{{•}} [[Hovenweep National Monument|Hovenweep]]{{•}} [[Yucca House National Monument|Yucca House]]<br />
| group3 = National Historic Sites<br />
| list3 = [[Bent's Old Fort National Historic Site|Bent's Old Fort]]{{•}} [[Sand Creek Massacre National Historic Site|Sand Creek Massacre]]<br />
| group4 = National Recreation Area<br />
| list4 = [[Curecanti National Recreation Area|Curecanti]]<br />
}}<br />
| group2 = National Forests<br />
| list2 = [[Arapaho National Forest|Arapaho]]{{•}} [[Grand Mesa National Forest|Grand Mesa]]{{•}} [[Gunnison National Forest|Gunnison]]{{•}} [[Pike National Forest|Pike]]{{•}} [[Rio Grande National Forest|Rio Grande]]{{•}} [[Roosevelt National Forest|Roosevelt]]{{•}} [[Medicine Bow - Routt National Forest|Medicine Bow - Routt]]{{•}} [[San Isabel National Forest|San Isabel]]{{•}} [[San Juan National Forest|San Juan]]{{•}} [[Uncompahgre National Forest|Uncompahgre]]{{•}} [[White River National Forest|White River]]<br />
}}<br />
<br />
<pre style="overflow:scroll;"><br />
{{Navbox<br />
| name = Protected Areas of Colorado<br />
| title = Protected Areas of Colorado<br />
| group1 = National Park Service<br />
| list1 = <br />
{{Navbox subgroup<br />
|group1 = National Parks<br />
|list1 = [[Black Canyon of the Gunnison National Park|Black Canyon of the Gunnison]]{{•}} [[Great Sand Dunes National Park and Preserve|Great Sand Dunes]]{{•}} [[Mesa Verde National Park|Mesa Verde]]{{•}} [[Rocky Mountain National Park|Rocky Mountain]]<br />
|group2 = National Monuments<br />
|list2 = [[Colorado National Monument|Colorado]]{{•}} [[Florissant Fossil Beds National Monument|Florissant Fossil Beds]]{{•}} [[Hovenweep National Monument|Hovenweep]]{{•}} [[Yucca House National Monument|Yucca House]]<br />
|group3 = National Historic Sites<br />
|list3 = [[Bent's Old Fort National Historic Site|Bent's Old Fort]]{{•}} [[Sand Creek Massacre National Historic Site|Sand Creek Massacre]]<br />
|group4 = National Recreation Area<br />
|list4 = [[Curecanti National Recreation Area|Curecanti]]<br />
}}<br />
| group2 = National Forests<br />
| list2 = [[Arapaho National Forest|Arapaho]]{{•}} [[Grand Mesa National Forest|Grand Mesa]]{{•}} [[Gunnison National Forest|Gunnison]]{{•}} [[Pike National Forest|Pike]]{{•}} [[Rio Grande National Forest|Rio Grande]]{{•}} [[Roosevelt National Forest|Roosevelt]]{{•}} [[Medicine Bow - Routt National Forest|Medicine Bow - Routt]]{{•}} [[San Isabel National Forest|San Isabel]]{{•}} [[San Juan National Forest|San Juan]]{{•}} [[Uncompahgre National Forest|Uncompahgre]]{{•}} [[White River National Forest|White River]]<br />
}}<br />
</pre><br />
<br />
=== Example 2 ===<br />
This example implements horizontal group headings by assigning the headings to <code>list1</code> and <code>list3</code> and the links to <code>list2</code> and <code>list4</code>), then using <code>list1style</code> and <code>list3style</code> to set the background color of the headings.<br />
<br />
{{Navbox<br />
| state = expanded<br />
| name = Roman Emperors<br />
| title = Roman Emperors<br />
| group1 = Crisis 235 AD - 284 AD<br />
| list1 = [[Maximinus Thrax]]{{·}} [[Gordian I]]{{·}} [[گورديان الثاني|Gordian II]]{{·}} [[پاپينوس|Pupienus]] and [[Balbinus]]{{·}} [[Gordian III]]{{·}} [[Philip the Arab]]{{·}} [[Decius]]{{·}} [[Trebonianus Gallus]]{{·}} [[Aemilianus]]{{·}} [[Valerian (emperor)|Valerian]]{{·}} [[Gallienus]]{{·}} [[Claudius II]]{{·}} [[Quintillus]]{{·}} [[Aurelian]]{{·}} [[Marcus Claudius Tacitus]]{{·}} [[Florianus]]{{·}} [[Probus]]{{·}} [[Carus]]{{·}} [[Numerian]]{{·}} [[Carinus]]<br />
| group2 = Dominate<br />
| list2 = <br />
{{Navbox subgroup<br />
|list1style = background:#ddf;<br />
|list1 = '''284 AD - 395 AD'''<br />
|list2 = [[Diocletian]]{{·}} [[Maximian]]{{·}} [[Constantius Chlorus|Constantius I]]{{·}} [[Galerius]]{{·}} [[Flavius Valerius Severus|Severus II]]{{·}} [[Maxentius]]{{·}} [[Maximinus]]{{·}} [[Licinius]]{{·}} [[Constantine I]]{{·}} [[Constantine II (emperor)|Constantine II]]{{·}} [[Constans|Constans I]]{{·}} [[Constantius II]]{{·}} [[Julian the Apostate]]{{·}} [[Jovian]]{{·}} [[Valentinian I]]{{·}} [[Valens]]{{·}} [[كراتيان|Gratian]]{{·}} [[Valentinian II]]{{·}} [[Eugenius]]{{·}} [[Theodosius I]]<br />
|list3style = background:#ddf;<br />
|list3 = '''Western Empire (393 AD - 476 AD)'''<br />
|list4 = [[Honorius (emperor)|Honorius]]{{·}} [[Constantius III]]{{·}} [[Joannes]]{{·}} [[Valentinian III]]{{·}} [[Petronius Maximus]]{{·}} [[Avitus]]{{·}} [[Majorian]]{{·}} [[Libius Severus]]{{·}} [[Anthemius]]{{·}} [[Olybrius]]{{·}} [[Glycerius]]{{·}} [[Julius Nepos]]{{·}} [[Romulus Augustus]]<br />
}}<br />
}}<br />
<br />
<pre style="overflow:scroll;"><br />
{{Navbox<br />
| name = Roman Emperors<br />
| title = Roman Emperors<br />
| group1 = Crisis 235 AD - 284 AD<br />
| list1 = [[Maximinus Thrax]]{{·}} [[Gordian I]]{{·}} [[گورديان الثاني|Gordian II]]{{·}} [[پاپينوس|Pupienus]] and [[Balbinus]]{{·}} [[Gordian III]]{{·}} [[Philip the Arab]]{{·}} [[Decius]]{{·}} [[Trebonianus Gallus]]{{·}} [[Aemilianus]]{{·}} [[Valerian (emperor)|Valerian]]{{·}} [[Gallienus]]{{·}} [[Claudius II]]{{·}} [[Quintillus]]{{·}} [[Aurelian]]{{·}} [[Marcus Claudius Tacitus]]{{·}} [[Florianus]]{{·}} [[Probus]]{{·}} [[Carus]]{{·}} [[Numerian]]{{·}} [[Carinus]]<br />
| group2 = Dominate<br />
| list2 = <br />
{{Navbox subgroup<br />
|list1style = background:#ddf;<br />
|list1 = '''284 AD - 395 AD'''<br />
|list2 = [[Diocletian]]{{·}} [[Maximian]]{{·}} [[Constantius Chlorus|Constantius I]]{{·}} [[Galerius]]{{·}} [[Flavius Valerius Severus|Severus II]]{{·}} [[Maxentius]]{{·}} [[Maximinus]]{{·}} [[Licinius]]{{·}} [[Constantine I]]{{·}} [[Constantine II (emperor)|Constantine II]]{{·}} [[Constans|Constans I]]{{·}} [[Constantius II]]{{·}} [[Julian the Apostate]]{{·}} [[Jovian]]{{·}} [[Valentinian I]]{{·}} [[Valens]]{{·}} [[كراتيان|Gratian]]{{·}} [[Valentinian II]]{{·}} [[Eugenius]]{{·}} [[Theodosius I]]<br />
|list3style = background:#ddf;<br />
|list3 = '''Western Empire (393 AD - 476 AD)'''<br />
|list4 = [[Honorius (emperor)|Honorius]]{{·}} [[Constantius III]]{{·}} [[Joannes]]{{·}} [[Valentinian III]]{{·}} [[Petronius Maximus]]{{·}} [[Avitus]]{{·}} [[Majorian]]{{·}} [[Libius Severus]]{{·}} [[Anthemius]]{{·}} [[Olybrius]]{{·}} [[Glycerius]]{{·}} [[Julius Nepos]]{{·}} [[Romulus Augustus]]<br />
&nbsp;&nbsp;}}<br />
}}<br />
</pre><br />
<br />
= انظر أيضاً =<br />
* {{t1|Navbox}} &ndash; Basic navbox<br />
* {{t1|Navbox with columns}} &ndash; Allows columns instead of groups/lists<br />
* {{t1|Navbox with collapsible groups}} &ndash; Another variation.<br />
* [[Wikipedia:Line break handling]] &ndash; 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.<br />
* {{t1|Nowrap begin}} &ndash; The recommended format for adding bullets, pipes, or dashes between list items. The page describes how to go about using them with proper wrapping.<br />
* {{t1|Nobold}} &ndash; To display text at normal font-weight within a context where the default font-weight is bold, e.g. header cells in tables.<br />
<br />
<br />
{{Navigational templates}}<br />
<br />
<includeonly><br />
[[تصنيف:قوالب معقدة]]<br />
[[تصنيف:قوالب تصفح| ]]<br />
[[تصنيف:Wikipedia metatemplates|{{اسم_الصفحة}}]]<br />
<br />
[[eo:Ŝablono:Navigilo subgrupo]]<br />
[[be-x-old:Шаблён:Навігацыйная сабтабліца]]<br />
[[bg:Шаблон:Навигационен шаблон подгрупа]]<br />
[[ca:Plantilla:Subgrup de caixa de navegació]]<br />
[[ckb:داڕێژە:Navbox subgroup]]<br />
[[en:Template:Navbox subgroup]]<br />
[[fr:Modèle:Méta palette de navigation sous-groupe]]<br />
[[hsb:Předłoha:Nawitabela z podskupinami]]<br />
[[hy:Կաղապար:Navbox subgroup]]<br />
[[ko:틀:안내/중첩]]<br />
[[ku:Şablon:Navbox subgroup]]<br />
[[id:Templat:Navbox subgroup]]<br />
[[is:Snið:Navbox generic subgroup]]<br />
[[ja:Template:Navbox subgroup]]<br />
[[ka:თარგი:ნავდაფა ქვეჯგუფი]]<br />
[[pl:Szablon:Navbox podgrupa]]<br />
[[pt:Predefinição:Navbox subgroup]]<br />
[[ro:Format:Subgrup casetă de navigare]]<br />
[[ru:Шаблон:Navbox subgroups]]<br />
[[simple:Template:Navbox generic subgroup]]<br />
[[sl:Predloga:Navpolje podskupina]]<br />
[[tr:Şablon:Dolaşım iç]]<br />
[[uk:Шаблон:Navbox subgroup]]<br />
[[vi:Bản mẫu:Navbox subgroup]]<br />
[[zh:Template:Navbox subgroup]]<br />
</includeonly></div>إدارة الموسوعة 1