Difference between revisions of "Template:Collapsible"

From CWCki
Jump to navigation Jump to search
m
(Collapsible gallery classes corrected.)
 
Line 1: Line 1:
{| class="collapsible collapsed" style="border:1px solid #aaa; background-color:#f9f9f9; padding:5px; font-size:95%; clear:both; margin:0 auto; width:70%;"
{| class="mw-collapsible {{#ifeq:{{{state}}}|expanded||mw-collapsed}}" style="border:1px solid #aaa; background-color:#f9f9f9; padding:5px; font-size:95%; clear:both; margin:0 auto; width:75%;"
! style="background-color:#ccf;" | {{{1}}}
! style="background-color:#ccf;" | {{{1}}}
|-
|-
Line 5: Line 5:
|}<noinclude>{{Usage|1=This is a formatting template used to create collapsible boxes around content. This is especially useful for image galleries, navigation boxes, lists, and other sections that make a long article unwieldy.   
|}<noinclude>{{Usage|1=This is a formatting template used to create collapsible boxes around content. This is especially useful for image galleries, navigation boxes, lists, and other sections that make a long article unwieldy.   
   
   
The format for using this template is as follows:<br />
The format for using this template is as follows:


  <nowiki>{{collapsible|title|content}}</nowiki>
  <nowiki>{{collapsible|title|content}}</nowiki>


-Displays: {{collapsible|title|content}}
-Displays: {{collapsible|title|content}}
You can have the table expanded by default, by setting “state” to “expanded”.
<nowiki>{{collapsible|state=expanded|title|content}}</nowiki>
-Displays: {{collapsible|state=expanded|title|content}}


As an example, the following box will contain a gallery of Chris's homemade [[Yu-Gi-Oh!]] cards.
As an example, the following box will contain a gallery of Chris's homemade [[Yu-Gi-Oh!]] cards.

Latest revision as of 16:49, 24 May 2019

{{{1}}}
{{{2}}}

Usage

These usage notes will not be included in articles bearing this template.

This is a formatting template used to create collapsible boxes around content. This is especially useful for image galleries, navigation boxes, lists, and other sections that make a long article unwieldy.

The format for using this template is as follows:

{{collapsible|title|content}}

-Displays:

title
content

You can have the table expanded by default, by setting “state” to “expanded”.

{{collapsible|state=expanded|title|content}}

-Displays:

title
content

As an example, the following box will contain a gallery of Chris's homemade Yu-Gi-Oh! cards.

{{collapsible
|Chris's homemade ''[[Yu-Gi-Oh!]]'' cards
|<gallery perrow="5">
Image:104-GirlfriendAttract.jpg|example caption
Image:105-LonesomeSelf.jpg
Image:106-FrustratedVirgin.jpg|another caption
Image:107-HookedOnSonichu2.jpg
Image:108-PlanForAttraction.jpg
Image:109-CWCSpellsCard.jpg
Image:138-CurseYeHaMeHa.jpg
Image:139-CWCsDarkGlare.jpg
Image:140-AJerk.jpg
Image:141-JerksLoiteringLot.jpg
Image:142-QuizGirlfriend.jpg
Image:143-MaryLeeWalsh.jpg
Image:145-ShatteredHeart.jpg
Image:146-Jerkop.jpg
</gallery>}}

-Displays:

Chris's homemade Yu-Gi-Oh! cards