Template:Collapsible option

出自しゅつじ維基百科ひゃっか自由じゆう百科全書ひゃっかぜんしょ

はつはじめ狀態じょうたい而家あずかしつらえがかりautocollapse

ようしつらえ呢個嘅初はじめ狀態じょうたい以用さんすう|state=

  • |state=collapsed:{{BASEPAGENAME|state=collapsed}},とう顯示けんじがかりおさむうめそくがかりなりかたぎきよしがかり睇到標題ひょうだいれつ
  • |state=expanded:{{BASEPAGENAME|state=expanded}},とう顯示けんじがかり攤開,そくがかりなり睇到
  • |state=autocollapse: {{BASEPAGENAME|state=autocollapse}},とう
    • 如果ゆうだい{{navbar}}、{{sidebar}},あるただし有可ゆかおりうめまいかず嘅第啲表同時どうじ出現しゅつげん,就收うめかえし標題ひょうだいれつ
    • 如果冇第啲可おりうめ嘅嘢,就顯示けんじ攤開

如果|state=まいりすう冇設,噉呢はつはじめ狀態じょうたいかいCollapsible optionかたぎ|default=さんすういえ呢頁呢個|default=まいりすう值係autocollapse.

かたぎかい[] [あらため] [ふみ] [きよし]

{{Collapsible option}} provides a standardised message for transclusion on the pages of collapsible templates whose collapsibility may be managed by the parameter state.

呢個以一係擺喺模本身嗰頁(<noinclude>...</noinclude>しめぎくじあいだ),一係擺喺模嘅{{documentation subpage}}。

Indicating optional use of state name[編輯へんしゅう]

The state parameter used to manage collapsible templates need not always be named explicitly, i.e. {{[Template name]|state}} can be the same as {{[Template name]|state=state}}. To indicate this in the {{Collapsible option}} message, add the parameter |statename=optional. This modifies the message so that it reads (if it were used for itself):

はつはじめ狀態じょうたい而家あずかしつらえがかりautocollapse

ようしつらえ呢個嘅初はじめ狀態じょうたい以用さんすう|state=

  • |state=collapsed:{{Collapsible option|state=collapsed}},とう顯示けんじがかりおさむうめそくがかりなりかたぎきよしがかり睇到標題ひょうだいれつ
  • |state=expanded:{{Collapsible option|state=expanded}},とう顯示けんじがかり攤開,そくがかりなり睇到
  • |state=autocollapse: {{Collapsible option|state=autocollapse}},とう
    • 如果ゆうだい{{navbar}}、{{sidebar}},あるただし有可ゆかおりうめまいかず嘅第啲表同時どうじ出現しゅつげん,就收うめかえし標題ひょうだいれつ
    • 如果冇第啲可おりうめ嘅嘢,就顯示けんじ攤開

如果|state=まいりすう冇設,噉呢はつはじめ狀態じょうたいかいCollapsible optionかたぎ|default=さんすういえ呢頁呢個|default=まいりすう值係autocollapse.

(This possibility is enabled by including:
  • {{{1|}}} as part of a collapsible template's state parameterTemplate:Spaced ndashfor instance, as |state={{{state|{{{1|}}}}}} or |state={{{state|{{{1|<noinclude>expanded</noinclude>}}}}}}, etc.
  • <noinclude>,<includeonly>as part of a collapsible template's state argumentTemplate:Spaced ndashfor instance, as |state={{{state<includeonly>|collapsed</includeonly>}}}
If, however, the template includes collapsible sections within itself (e.g. {{Navbox with collapsible groups}}), then enabling this possibility may introduce ambiguity as regards what is to be collapsed or expanded. In those instances, therefore, the requirement to use |state= should be retained.)

Changing the default state[編輯へんしゅう]

To change the default state {{Collapsible option}} uses, add the parameter |default=collapsed or |default=expanded accordingly. To restore the default, remove any |default= previously included.

nobase[編輯へんしゅう]

If the template name given to {{Collapsible option}} includes a (forward-)slash character ("/"), the parameter |nobase= (set to "on", "true", etc.) will need to be added so that the name is displayed correctly (i.e. so that {{PAGENAME}} rather than the default {{BASEPAGENAME}} is used to display it).