Template:Switch

From Moegirlpedia
Jump to: navigation, search
Template-info.svg Template Documentation  [View] [] [History] [Refresh]

This series of templates is used to manually show/hide specific strings and to specify strings and button styles in bulk.

Usage

Note that string designators may be in lowercase English letters, uppercase English letters, Chinese characters, etc. (not considered wikitext).
  • Must not contain', ", <, >, \, /, |, do not start with @ at the beginning; otherwise it will be ignored;
{{Switch|Item 1|Item 2|Item 3}}
Required, used to specify the string that needs to be manually switched. There is no limit to this parameter.
Templates that require line breaks
When the value of parameter 3 is span (when this template cannot take effect):
{{Switch/Button
|span1=Switch gifts
}}{{Switch|span1|
{{bilibiliVideo|id=BV1nC4y147iy|page=1|width=600|height=421|autoplay=yes}}<nowiki/>
|span}}
Switch giftsSwitch giftsspan1span1
Wide ModeShow
Wide ModeShow
spanspan
When the value of parameter 3 is div:
{{Switch/Button
|div1=Switch gifts
}}{{Switch|div1|
{{bilibiliVideo|id=BV1nC4y147iy|page=1|width=600|height=421|autoplay=yes}}<nowiki/>
|div}}
Switch giftsSwitch gifts


Templates that do not require line breaks
When the value of parameter 3 is span:
{{Switch/Button
|span2=Switch Ruby
}}{{Switch|span2|
{{顏文字|丘比}}<nowiki/>
|span}}

Switch RubySwitch Ruby

When the value of parameter 3 is div:
{{Switch/Button
|div2=Switch Ruby
}}{{Switch|div2|
{{顏文字|Ruby}}<nowiki/>
|div}}
Switch RubySwitch Ruby

Wikitext that requires line breaks

添加表格
Note: 由於表格wikitext較為Template:Rubyh,裡面所有帶有|的格式符號都需要進行替換。
當然,任何時候=都需要替換。

Template:Example

Add other wikitext that need line breaks
Note: 此處的<nowiki/>與wikitext之間應換行,否則wikitext會失效。

Template:Example

Related