Template:Collapsible list: Difference between revisions

Template page
w:c:strategywiki>Najzere
(collapsible list template, based on http://en.wikipedia.org/w/index.php?title=Template:Collapsible_list&oldid=321993118)
 
w:c:strategywiki>Najzere
m (removing width style)
Line 1: Line 1:
<div class="NavFrame {{{expand|collapsed}}}" style="{{{framestyle|border:none; padding:0;}}}">
<div class="NavFrame {{{expand|collapsed}}}" style="{{{framestyle|border:none; padding:0;}}}">
     <div class="NavHead" style="{{{titlestyle|width:96%; background:transparent;}}}" align="left}}"><!--
     <div class="NavHead" style="{{{titlestyle|background:transparent;}}}" align="left}}"><!--
     -->{{{title|List}}}<!--
     -->{{{title|List}}}<!--
  --></div>
  --></div>

Revision as of 20:53, 17 November 2009

This page has been transcluded from Template:Collapsible list/Documentation.


This template creates a collapsible list with room for up to 50 items.

Parameters

Unnamed

These range from 1–50 and don't require a parameter name. For instance {{collapsible list|one|two|three}} will result in:

Named parameters

These parameters are all technically optional, but it is suggested that you at least give the title parameter.

  • title: The title of the list. Default is "List".
  • expand: Putting something here will make the list expanded on page load. Default is collapsed.
  • framestyle: CSS styling for the entire list container. Default is "border:none; padding:0;".
  • titlestyle: CSS styling for the title element. Default is "background:transparent;font-size:12px".
  • liststyle: CSS styling for the list itself. Default is "text-align:left;".

Examples

Standalone template
{{collapsible list
|one
|two
|three
|title=Example list
|expand=yes
|framestyle=padding:3px;border:1px solid black;
|titlestyle=background-color:pink;padding:2px;text-align:center;
|liststyle=text-align:left;color:blue;margin-left:10px;
}}


Within another element
{{collapsible list
|[[bulbapedia:Sandshrew|Alolan Sandshrew]]
|[[bulbapedia:Sandslash|Alolan Sandslash]]
|[[bulbapedia:Vulpix|Alolan Vulpix]]
|[[bulbapedia:Ninetails|Alolan Ninetails]]
|[[bulbapedia:Smoochum|Smoochum]]
|[[bulbapedia:Jinx|Jinx]]
|title=TMs}}
Example table