الگو:Navbox subgroup/توضیحات: تفاوت میان نسخه‌ها

۳٬۶۶۲ بایت اضافه‌شده ،  ‏۲۳ اوت ۲۰۱۷
صفحه‌ای تازه حاوی «<sub>{{زیرصفحه توضیحات}} {{Esoteric}} <!-- لطفا رده‌ها و پیوندهای میان‌ویکی را در انته...» ایجاد کرد
جز (ربات: جایگزینی خودکار متن (-#e6e6ff +#e5edff))
 
(صفحه‌ای تازه حاوی «<sub>{{زیرصفحه توضیحات}} {{Esoteric}} <!-- لطفا رده‌ها و پیوندهای میان‌ویکی را در انته...» ایجاد کرد)
خط ۱: خط ۱:
{{زیرصفحه توضیحات}}
<sub>{{زیرصفحه توضیحات}}
{{الگوی پیچیده}}
{{Esoteric}}
{{چپ‌چین}}
<!-- لطفا رده‌ها و پیوندهای میان‌ویکی را در انتهای این صفحه اضافه کنید -->
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
 
{{Navbox suite}}
{{Navbox suite}}
This template is designed to be used with {{الگو|Navbox}} or other [[ویکی‌پدیا:الگوهای ناوبری|navigation 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 {{الگو|Navbox}}. A subgroup may contain up to 20 list items.
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.


== Blank template ==
== Blank template ==
خط ۲۳: خط ۲۳:


== Parameters ==
== 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:
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:
*The border parameter defaults to "child"
*The border parameter defaults to "child"
*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 affecting the width of groups.
*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 affecting the width of groups.
Everything else is ''exactly'' the same as {{الگو|Navbox}}.
Everything else is ''exactly'' the same as {{t1|Navbox}}.


Only the most common parameters are listed below.
Only the most common parameters are listed below.
=== Cells ===
=== Cells ===
:; ''list<sub>n</sub>''
:; ''list<sub>n</sub>''
خط ۳۵: خط ۳۴:


:; ''group<sub>n</sub>''
:; ''group<sub>n</sub>''
:: (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:#e5edff; color:black;">#e5edff</span></code>, but can be changed via the ''groupstyle'' parameter (see below).
:: (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).


=== Styles ===
=== Styles ===
:; ''bodystyle''
:; ''bodystyle''
:: Specifies [[شیوه‌نامهٔ آبشاری|CSS]] styles to apply to the template body. Examples:
:: Specifies [[Cascading Style Sheets|CSS]] styles to apply to the template body. Examples:
::: <code>background:#''nnnnnn'';</code>
::: <code>background:#''nnnnnn'';</code>
::: <code>text-align:[''right/center/left/justified''];</code>
::: <code>text-align:[''right/center/left/justified''];</code>
خط ۶۶: خط ۶۵:


==Setting the width of groups==
==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 <code>groupwidth</code> parameter:
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>groupwidth</code> parameter:


:<code>groupwidth = 10em</code>
:<code>groupwidth = 10em</code>


An alternative way is to 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 {{الگو|Navbox subgroup}} to adjust the widths:
An alternative way is to 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:
:<code>groupstyle = width:10em;</code>
:<code>groupstyle = width:10em;</code>
:<code>liststyle = width:auto;</code>
:<code>liststyle = width:auto;</code>
*NOTE: For the <code>groupstyle</code> widths to work, you '''must''' set the <code>liststyle</code> width to "auto".
*NOTE: For the <code>groupstyle</code> widths to work, you '''must''' set the <code>liststyle</code> width to "auto".
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.
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.
{{پایان}}
 
==نمونه==
==Examples==
در زیر مثالی از استفاده ''Navbox subgroup'' در یک الگوی ''ناوباکس'' است.
=== Example 1 ===
The following is an example of ''Navbox subgroup'' used within a ''Navbox'' template.


{{Navbox
{{Navbox
| state  = uncollapsed
| state  = uncollapsed
| name  = مناطق حفاظت‌شده کلرادو
| name  = Protected Areas of Colorado
| title  = مناطق حفاظت‌شده کلرادو
| title  = Protected Areas of Colorado
| listclass = hlist
| group1 = National Park Service
| group1 = سازمان پارک‌های ملی
| list1  =
| list1  = {{Navbox subgroup
  {{Navbox subgroup
   | group1 = پارک‌های ملی
   | group1 = National Parks
   | list1  =
   | 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]]
*[[پارک ملی بلک کنیون آو د گانیسون| بلک کنیون آو د گانیسون]]
   | group2 = National Monuments
*[[پارک ملی تل‌ماسه‌های بزرگ|تل‌ماسه‌های بزرگ]]
   | list2  = [[Colorado National Monument|Colorado]]{{•}} [[Florissant Fossil Beds National Monument|Florissant Fossil Beds]]{{•}} [[Hovenweep National Monument|Hovenweep]]{{•}} [[Yucca House National Monument|Yucca House]]
*[[پارک ملی میزا ورده|میزا ورده]]
   | group3 = National Historic Sites
*[[پارک ملی کوه راکی|کوه راکی]]
   | list3  = [[Bent's Old Fort National Historic Site|Bent's Old Fort]]{{•}} [[Sand Creek Massacre National Historic Site|Sand Creek Massacre]]
   | group2 = آثار ملی
   | group4 = National Recreation Area
   | list2  =
   | list4  = [[Curecanti National Recreation Area|Curecanti]]
*[[Colorado National Monument|Colorado]]
*[[Florissant Fossil Beds National Monument|Florissant Fossil Beds]]
*[[Hovenweep National Monument|Hovenweep]]
*[[Yucca House National Monument|Yucca House]]
   | group3 = مکان‌های تاریخی و ملی
   | list3  =
*[[Bent's Old Fort National Historic Site|Bent's Old Fort]]
*[[Sand Creek Massacre National Historic Site|Sand Creek Massacre]]
   | group4 = منطقه تفریحی ملی
   | list4  =
*[[Curecanti National Recreation Area|Curecanti]]
   }}
   }}
| group2 = جنگل‌های ملی
| group2 = National Forests
| list2  =
| 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]]
*[[Arapaho National Forest|Arapaho]]
*[[Grand Mesa National Forest|Grand Mesa]]
*[[Gunnison National Forest|Gunnison]]
*[[جنگل ملی پایک|پایک]]
*[[جنگل ملی ریوگراند|ریوگراند]]
*[[جنگل ملی آراپاهو و روزولت|آراپاهو و روزولت]]
*[[جنگل ملی مدیسین بو-راوت|مدیسین بو-راوت]]
*[[جنگل ملی سن ایزابل|سن ایزابل]]
*[[جنگل ملی سن خوان|سن خوان]]
*[[Uncompahgre National Forest|Uncompahgre]]
*[[جنگل ملی وایت ریور|وایت ریور]]
}}
}}


<pre style="overflow:scroll;">
<pre style="overflow:scroll;">
{{Navbox
{{Navbox
| state  = uncollapsed
| name  = Protected Areas of Colorado
| name  = مناطق حفاظت‌شده کلرادو
| title  = Protected Areas of Colorado
| title  = مناطق حفاظت‌شده کلرادو
| group1 = National Park Service
| listclass = hlist
| list1  =  
| group1 = سازمان پارک‌های ملی
  {{Navbox subgroup
| list1  = {{Navbox subgroup
  |group1 = National Parks
  | group1 = پارک‌های ملی
  |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]]
  | list1  =
  |group2 = National Monuments
*[[پارک ملی بلک کنیون آو د گانیسون| بلک کنیون آو د گانیسون]]
  |list2  = [[Colorado National Monument|Colorado]]{{•}} [[Florissant Fossil Beds National Monument|Florissant Fossil Beds]]{{•}} [[Hovenweep National Monument|Hovenweep]]{{•}} [[Yucca House National Monument|Yucca House]]
*[[پارک ملی تل‌ماسه‌های بزرگ|تل‌ماسه‌های بزرگ]]
  |group3 = National Historic Sites
*[[پارک ملی میزا ورده|میزا ورده]]
  |list3  = [[Bent's Old Fort National Historic Site|Bent's Old Fort]]{{•}} [[Sand Creek Massacre National Historic Site|Sand Creek Massacre]]
*[[پارک ملی کوه راکی|کوه راکی]]
  |group4 = National Recreation Area
  | group2 = آثار ملی
  |list4  = [[Curecanti National Recreation Area|Curecanti]]
  | list2  =
*[[Colorado National Monument|Colorado]]
*[[Florissant Fossil Beds National Monument|Florissant Fossil Beds]]
*[[Hovenweep National Monument|Hovenweep]]
*[[Yucca House National Monument|Yucca House]]
  | group3 = مکان‌های تاریخی و ملی
  | list3  =
*[[Bent's Old Fort National Historic Site|Bent's Old Fort]]
*[[Sand Creek Massacre National Historic Site|Sand Creek Massacre]]
  | group4 = منطقه تفریحی ملی
  | list4  =
*[[Curecanti National Recreation Area|Curecanti]]
   }}
   }}
| group2 = جنگل‌های ملی
| group2 = National Forests
| list2  =
| 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]]
*[[Arapaho National Forest|Arapaho]]
*[[Grand Mesa National Forest|Grand Mesa]]
*[[Gunnison National Forest|Gunnison]]
*[[جنگل ملی پایک|پایک]]
*[[جنگل ملی ریوگراند|ریوگراند]]
*[[جنگل ملی آراپاهو و روزولت|آراپاهو و روزولت]]
*[[جنگل ملی مدیسین بو-راوت|مدیسین بو-راوت]]
*[[جنگل ملی سن ایزابل|سن ایزابل]]
*[[جنگل ملی سن خوان|سن خوان]]
*[[Uncompahgre National Forest|Uncompahgre]]
*[[جنگل ملی وایت ریور|وایت ریور]]
}}
}}
</pre>
</pre>


== جستارهای وابسته ==
=== Example 2 ===
{{چپ‌چین}}
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.
* {{الگو|Navbox}} – Basic navbox
* {{الگو|Navbox with columns}} – Allows columns instead of groups/lists
* {{الگو|Navbox with collapsible groups}} – Another variation.
* {{strikethrough|[[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.}} Deprecated; use the <code>hlist</code> class.
* {{strikethrough|{{الگو|Nowrap begin}} – The recommended format for adding bullets, pipes, or dashes between list items.}} Deprecated; use the <code>hlist</code> class.
* {{الگو|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}}
{{Navbox
| state = expanded
| name  = Roman Emperors
| title = Roman Emperors
| group1 = Crisis 235 AD - 284 AD
| 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]]
| group2 = Dominate
| list2  =
  {{Navbox subgroup
  |list1style = background:#ddf;
  |list1 = '''284 AD - 395 AD'''
  |list2 = [[Diocletian]]{{·}} [[ماکسیمیان]]{{·}} [[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]]{{·}} [[ژولیان]]{{·}} [[Jovian (Emperor)|Jovian]]{{·}} [[Valentinian I]]{{·}} [[Valens]]{{·}} [[Gratian]]{{·}} [[Valentinian II]]{{·}} [[Eugenius]]{{·}} [[Theodosius I]]
  |list3style = background:#ddf;
  |list3 = '''Western Empire (393 AD - 476 AD)'''
  |list4 = [[Honorius (emperor)|Honorius]]{{·}} [[Constantius III]]{{·}} [[Joannes]]{{·}} [[Valentinian III]]{{·}} [[Petronius Maximus]]{{·}} [[Avitus]]{{·}} [[Majorian]]{{·}} [[Libius Severus]]{{·}} [[Anthemius]]{{·}} [[Olybrius]]{{·}} [[Glycerius]]{{·}} [[Julius Nepos]]{{·}} [[Romulus Augustus]]
  }}
}}


<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<pre style="overflow:scroll;">
<!--Categories-->
{{Navbox
[[رده:جعبه‌های ناوبری| ]]
| name  = Roman Emperors
[[رده:فراالگوهای ویکی‌پدیا|{{PAGENAME}}]]
| title = Roman Emperors
| group1 = Crisis 235 AD - 284 AD
| 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]]
| group2 = Dominate
| list2  =
  {{Navbox subgroup
  |list1style = background:#ddf;
  |list1 = '''284 AD - 395 AD'''
  |list2 = [[Diocletian]]{{·}} [[ماکسیمیان]]{{·}} [[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]]{{·}} [[ژولیان]]{{·}} [[Jovian (Emperor)|Jovian]]{{·}} [[Valentinian I]]{{·}} [[Valens]]{{·}} [[Gratian]]{{·}} [[Valentinian II]]{{·}} [[Eugenius]]{{·}} [[Theodosius I]]
  |list3style = background:#ddf;
  |list3 = '''Western Empire (393 AD - 476 AD)'''
  |list4 = [[Honorius (emperor)|Honorius]]{{·}} [[Constantius III]]{{·}} [[Joannes]]{{·}} [[Valentinian III]]{{·}} [[Petronius Maximus]]{{·}} [[Avitus]]{{·}} [[Majorian]]{{·}} [[Libius Severus]]{{·}} [[Anthemius]]{{·}} [[Olybrius]]{{·}} [[Glycerius]]{{·}} [[Julius Nepos]]{{·}} [[Romulus Augustus]]
&nbsp;&nbsp;}}
}}
</pre>
 
== See also ==
* {{t1|Navbox}} &ndash; Basic navbox
* {{tl|Navbox subgroup long}} &ndash; expanded version of {{tl|Navbox subgroup}} allowing up to 38 subgroups
* {{t1|Navbox with columns}} &ndash; Allows columns instead of groups/lists
* {{t1|Navbox with collapsible groups}} &ndash; Another variation.
* [[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.
* {{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.
* {{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.


<!--Other languages-->
{{Navigational templates}}
}}</includeonly>


<includeonly>
<includeonly>
<!--Categories-->


<!--Other languages-->
[[eo:Ŝablono:Navigilo subgrupo]]
[[bg:Шаблон:Навигационен шаблон подгрупа]]
[[en:Template:Navbox subgroup]]
[[fr:Modèle:Méta palette de navigation sous-groupe]]
[[hsb:Předłoha:Nawitabela z podskupinami]]
[[hy:Կաղապար:Navbox subgroup]]
[[ko:틀:안내/중첩]]
[[id:Templat:Navbox subgroup]]
[[ja:Template:Navbox subgroup]]
[[ka:თარგი:ნავდაფა ქვეჯგუფი]]
[[pt:Predefinição:Navbox subgroup]]
[[ro:Format:Subgrup casetă de navigare]]
[[ru:Шаблон:Navbox subgroups]]
[[simple:Template:Navbox generic subgroup]]
[[tr:Şablon:Dolaşım iç]]
[[zh:Template:Navbox subgroup]]
{{Pp-template}}
</includeonly>
</includeonly>
</sub>
۲٬۱۰۴

ویرایش