ទំព័រគំរូ:Navbox generic/doc

ពីវិគីភីឌា

ទំព័រគំរូនេះជាការអនុវត្តន៏នៃទំព័រគំរូNavigation។ គេអាចបង្កើតបញ្ជីList នេះតាមរយះការប្រប្រាស់ទំព័រគំរូនេះ។

ទ្រង់ទ្រាយ[កែប្រែ]

{{Navbox generic
|name       = {{subst:PAGENAME}}
|state      = 
|titlestyle = background:
|title      = 
|imageleft  =
|imageright =  
|bodystyle  =   <!--(ប្រសិនបើ "style =" មានភាពត្រឹមត្រូវ、ប៉ារ៉ាម៉ែត្រនៃstyleផ្សេងទៀតមិនអាចប្រើបានទេ។)-->
|groupstyle = 
|liststyle  = 
|oddstyle   = 
|evenstyle  = 

|abovestyle = 
|above      = 

|group1 = 
|list1  = 

|group2 = 
|list2  = 

|group3 = 
|list3  = 

 ...

|group20 = 
|list20  = 

|belowstyle = 
|below      = 
}}

ប៉ារាម៉ែត្រ[កែប្រែ]

តំរូវការ[កែប្រែ]

name(ឬtemplateName)
ឈ្មោះនៃទំព័រគំរូ។ テンプレートに表示される「表・話・編・履」のリンク先を適切に表示するために必要になります。{{subst:PAGENAME}}と入力すると簡単です。
title
タイトルバーの部分に表示される文字列です。多くはテンプレートの主題、内容を総括した語が入ります。1行で書く必要がありますが、もし2行目が必要な場合は{{tl:-}}を使用してください。
背景色の初期値は#ccf#ccccffの短縮記法)になっています。後述するtitlestyleパラメータで変更可能です。
listn
(i.e. list1, list2, etc.) テンプレートの本体でふつうはリンクのリストを記述します。書式はインラインですが全体を<div> </div>で囲むことで複数行に分けて書くことができます。最低1つのlistパラメータが必要で、追加のlistはテーブル内の別の行として表示されます。必要であればそれぞれのlistnの直前に対応するgroupnパラメータを置くことができます(後述)。
リスト部およびテーブル全体の背景色は初期値が#f9f9f9になっています。後述するbodystyleoddstyleおよびevenstyleで変更可能です。

Option[កែប្រែ]

Cell[កែប្រែ]

groupn
(i.e. group1, group2, etc.) これが記述されるとlistnとした部分の左に見出しセルが表示されます。省略すると、リスト部はテーブルの幅をすべて使って表示されます。
背景色の初期値は#ddfになっています。後述するgroupstyleパラメータで変更可能です。
グループの中に更にグループを作りたい場合は{{Navbox generic subgroup}}を併用してください。
imageright
(or image) 画像をタイトルの直下・リスト部の右側に表示します。正常に表示するためにはlist1パラメータを指定しておく必要があります。このパラメータは普通に画像を表示する際のwikiテキストをそのまま使います(例:[[Image:Example.jpg|100px]])。
テンプレートを画面右端一杯まで表示しない場合、画像が右側にはみ出て表示されてしまいます。これを防ぐためには画像のwikiテキストにrightパラメータを指定してください(例:[[Image:Example.jpg|80px|right]])。
imageleft
画像をタイトルの直下・リスト部の左側に表示します。正常に表示するためにはlist1パラメータを指定しておく必要があります。このパラメータは普通に画像を表示する際のwikiテキストをそのまま使います(例:[[Image:Example.jpg|100px]])。
above
(or top) 1行分のセルをタイトルと最初のグループ・リスト部の間に表示します。画像を使わないテンプレートではabovegroup1を指定しない場合のlist1と同じような表示になります。
below
(or bottom) テンプレートの一番下に1行分のセルを表示します。画像を使わないテンプレートではbelowは最後のlistnパラメータをgroupnを使わずに表示した場合と同じような表示になります。belowパラメータの使用例はen:Template:Lists of the provinces and territories of Canadaをご覧ください。

Style Template[កែប្រែ]

titlestyle
(or title_style, titlebkg, color) CSS styles to apply to title, specifically the titlebar's background color. At present, use as follows:
titlestyle = background:name or #nnnnnn
Use of this parameter is discouraged. Where it is used, care and consensus are needed as multiple navigational templates on one page with different background colors will probably look unpleasant.
bodystyle もしくは style
Specifies CSS styles to apply to the template body. The shorter name style may be used when no other style parameters are specified. This option should be used sparingly as it can lead to visual inconsistencies. Examples:
background:#nnnnnn;
text-align:[right/center/left/justified];
width:N [em/%/px or width:auto];
float:[left/right/none];
clear:[right/left/both/none];
groupstyle
(or group_style, group-style) 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;
abovestyle
belowstyle
(or above_style, top-style; below_style, bottom-style) CSS styles to apply to the top cell (specified via the above parameter) and bottom cell (specified via the below parameter). Typically used to set background color or text alignment:
background:#nnnnnn;
text-align:[left/center/right];
liststyle
CSS styles to apply to all lists. Overruled by the oddstyle and evenstyle parameters (if specified) below.
oddstyle
evenstyle
(or odd-style, even-style) 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; see {{Turkey-related topics}} for an example.

その他[កែប្រែ]

state
デフォルトはautocollapseです。これをcollapsedにすると最初は必ず折りたたまれた状態で表示されます。空白を指定するかautocollapsecollapsed以外の値を指定すると、最初は展開された状態で表示されます。autocollapseを指定するとページ内に2つかそれ以上のcollapsibleクラスを使用したテーブルがある場合には折りたたまれた状態で表示され、1つの場合は展開されて表示されます。技術的なことについてはMediaWiki:Common.jsを参照。
To specify different states for transcluding articles, set state to {{{state<includeonly>|autocollapse</includeonly>}}}. Then, in an article, set this parameter to a value described above. For example, {{templateName|state=}} will expand the template.

Layout[កែប្រែ]

ការបង្ហាញឧទាហរណ៏[កែប្រែ]

កូដ[កែប្រែ]

{{navbox generic
|name=ប្រទេសជប៉ុន
|title=[[ប្រទេសជប៉ុន]]
|style=text-align:left
|group1=ឈ្មោះតំបន់
|list1=[[ទីក្រុង តូក្យូ]] 
|group2=ឈ្មោះតំបន់ផ្សេងទៀត
|list2=[[អូសាកា]] - [[ហុកកៃដូ]] 
}}

ដងខ្លួន[កែប្រែ]

ទំព័រដែលមានការទាកទង[កែប្រែ]

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