Template:Hide: Difference between revisions
m (Fix Text) |
m (Undo revision 229189 by 924819012037263471 (talk)) Tag: Undo |
(One intermediate revision by the same user not shown) | |
(No difference)
|
Latest revision as of 09:34, 11 September 2023
This template is derived from Moegirl Encyclopedia, and I translated it into English and did some processing.
This template is used to hide one paragraph of text/pictures/tables and add titles to them.
Usage
Parameter name | Explain |
---|---|
show | When the parameter content isshow , the content will be expanded by default.
|
title | Title section of the table |
content | Contents section of the table |
width | Specify the length of the table |
expandtext | Customize the text description of "Unfold" |
collapsetext | Customize the text description of "Collapse" |
Some parameters can be omitted. The rules are as follows:
- If the value of the first nameless parameter is
show
, the content will be expanded by default:- At this time, if there is no parameter
title
, the nameless parameter value of the 2 will be used as the title part; - At this time, if there is no parameter
content
, the unnamed parameter value of the 3 will be used as the content part;
- At this time, if there is no parameter
- If the first nameless parameter value Not is
show
:- At this time, if there is no parameter
title
, the unnamed parameter value of the 1 will be used as the title part; - At this time, if there is no parameter
content
, the unnamed parameter value of the 2 will be used as the content part.
- At this time, if there is no parameter
Example of use
Basic example
{{Hide|You Know|*Test|expandtext=Do you really want to see it?|collapsetext=Actually, nothing}}
You Know |
---|
|
Picture example
{{Hide|File:Komeiji Koishi test.jpg|[[File:Komeiji Koishi test.jpg]]}}
File:Komeiji Koishi test.jpg |
---|
{{Hide|[[File:0Kpr68sa.png|100px]]|this is File:0Kpr68sa.png}}
this is File:0Kpr68sa.png |
Example of the 'show' parameter
{{Hide |title=File:Komeiji Koishi test.jpg |content= [[File:Komeiji Koishi test.jpg|100px]] |show=show }}
File:Komeiji Koishi test.jpg |
---|
{{hide |title=Example |content=Auto display hide template |show }}
Example |
---|
Auto display hide template |
- To sum up, using any of
|show=show
or|show
in the template will automatically display hidden content, while the writing method of|show=
will not automatically display hidden content. (Note the equal sign after the show parameter)
Template Embedded Table
If you directly use a wiki table in this template, errors will occur because the vertical line|
in the wiki table is incorrectly identified as the partition line of a parameter (for example,{{Hide||-}}will be identified as{{Hide|(no parameter)|(parameter: -)}})
Solution 1: Please use
{{!}}
to replace|
in the table, and{{!!}}
to replace||
in the table.
Solution 2: Instead of using {{hide}}, manually addclass="mw collectible mw collectible wikitable"
The code example is as follows:
{| class="mw-collapsible mw-collapsed wikitable" |- ! Skill Name !! Effect |- | '''Tocca''' || 「Fight」 Uses ribbons to attack. You have a chance to make the opponent enter the "bound" state |- | '''Tocca Spirale''' || 「Fight」Turn the ribbon into a spiral and attack the front |}
The effect is as follows:
Skill Name | Effect |
---|---|
Tocca | 「Fight」 Uses ribbons to attack. You have a chance to make the opponent enter the "bound" state |
Tocca Spirale | 「Fight」Turn the ribbon into a spiral and attack the front |