Template:Collapsible option/doc
呢頁係Template:Collapsible option嘅說明文件(子頁)。 呢度包含咗用法資料、分類同埋其他唔屬於個模本身嘅內容。 |
{{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
.
{{{1|}}}
as part of a collapsible template'sstate
parameterTemplate:Spaced ndashfor instance, as |state={{{state|{{{1|}}}}}} or |state={{{state|{{{1|<noinclude>expanded</noinclude>}}}}}}, etc.<noinclude>
,<includeonly>
as part of a collapsible template'sstate
argumentTemplate:Spaced ndashfor instance, as |state={{{state<includeonly>|collapsed</includeonly>}}}
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).