Template:Collapsible option

出自維基百科,自由嘅百科全書
Jump to navigation Jump to search

初始狀態:而家默認係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).