Wikicode: Difference between revisions

1,425 bytes added ,  11:53, 9 October 2014
no edit summary
imported>Rockdtben
(Created page with "==Wikicode== Wikicode is the strange syntax used by all wikipedias including this one. If you don't know it and are prepared to learn, continue reading. Otherwise, you can rea...")
imported>Jordie0608
No edit summary
Line 291: Line 291:


== Hiding/collapsing content ==
== Hiding/collapsing content ==
Add "mw-collapsed" to the class to have it start collapsed. See examples 1 and 3.


See [[Wikicode/Hiding content|Hiding content]]
=== Example 1: Table ===
 
<nowiki>{| class="mw-collapsible mw-collapsed wikitable"</nowiki><br>
<nowiki>! The header || remains visible</nowiki><br>
<nowiki>|-</nowiki><br>
<nowiki>| This  content || is hidden</nowiki><br>
<nowiki>|-</nowiki><br>
<nowiki>| at first || load time</nowiki><br>
<nowiki>|}</nowiki>
 
{| class="mw-collapsible mw-collapsed wikitable"
! The header || remains visible
|-
| This  content || is hidden
|-
| at first || load time
|}
 
=== Example 2: Text ===
 
<nowiki><div class="toccolours mw-collapsible" style="width:400px"></nowiki><br>
<nowiki> This text is collapsible. {{Lorem}}</nowiki><br>
<nowiki></div></nowiki><br>
 
<div class="toccolours mw-collapsible" style="width:400px">
This text is collapsible.
</div>
<br>
=== <span class="mw-customtoggle-0" style="font-size:small; display:inline-block; float:right;"><span class="mw-customtoggletext">[Show/hide]</span></span> Example 3: Section ===
<div  id="mw-customcollapsible-0" class="mw-collapsible mw-collapsed">
Text
 
Text
 
</div>
 
 
<nowiki>== <span class="mw-customtoggle-0" style="font-size:small; display:inline-block; float:right;"><span class="mw-customtoggletext">[Show/hide]</span></span> Example 3: Section ==</nowiki><br>
<nowiki><div  id="mw-customcollapsible-0" class="mw-collapsible mw-collapsed"></nowiki><br>
<nowiki>Text</nowiki><br>
<nowiki>Text</nowiki><br>
<nowiki></div></nowiki><br>


[[Category:Guides]]
[[Category:Guides]]
{{Contribution guides}}
{{Contribution guides}}
Anonymous user