Difference between revisions of "Template:Sidebar with collapsible lists/row"
(Import from Wikipedia (CC BY-SA license)) |
m (Convert to mw-collapsible) |
||
Line 1: | Line 1: | ||
− | <includeonly><div class=" | + | <includeonly><div class="mw-collapsible {{#if:{{{expand|}}}||mw-collapsed}}" style="border: none; padding: 0; {{{framestyle|}}}"> |
− | <div class=" | + | <div class="{{{titleclass|}}}" style="font-size: 105%; background: transparent; text-align: left; {{{titlestyle|}}}"><!-- |
-->{{#if:{{{title|}}} | {{{title}}} | List }}<!-- | -->{{#if:{{{title|}}} | {{{title}}} | List }}<!-- | ||
--></div> | --></div> | ||
− | <div class=" | + | <div class="{{{listclass|}}}" style="font-size: 105%; padding: 0.2em 0 0.4em; text-align: center; {{{liststyle|}}}"><!-- |
-->{{#if:{{{1|}}} | {{{1}}} }}<!-- | -->{{#if:{{{1|}}} | {{{1}}} }}<!-- | ||
--></div> | --></div> | ||
</div></includeonly><noinclude> | </div></includeonly><noinclude> | ||
− | |||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> |
Latest revision as of 21:14, 31 May 2015
This template uses material from the Wikipedia template Template:Sidebar with collapsible lists/row, which is released under the Creative Commons Attribution-ShareAlike 3.0 Unported License (view authors). | Error creating thumbnail: /bin/bash: rsvg-convert: command not found |
This subtemplate of {{sidebar with collapsible lists}} is used to generate a collapsible section. It is not intended to be used directly. For uses in other templates and/or articles, consider using {{collapsible list}} instead.
Contents
Usage
{{Sidebar with collapsible lists/row | expanded = | framestyle = | titlestyle = | listclass = | liststyle = | title = | 1 = }}
Parameters
Parameter | Notes |
---|---|
expanded | Any non blank value will cause the section to be expanded by default |
framestyle | The style to use for the section frame. The default style is 'border:none; padding: 0;' |
titlestyle | The style used for the section title. The default style is 'background: transparent; text-align: left' |
listclass | Class to use for the list (e.g., hlist or plainlist) |
liststyle | Additional styling for the list. The default styling is 'font-size:105%; padding:0.2em 0 0.4em; text-align:center;' |
title | Title for the section. The default value is 'List' |
1 | The contents of the section (the list) |
Coding notes
It should be noted that
{{{1|}}}
is not equivalent to
{{#if:{{{1|}}} | {{{1}}} }}
The second construct will remove whitespace and spurious newline characters from the input. This is important when the value is passed as an unnamed parameter, instead of formally using '1 ='.
Similarly, the construct
{{{framestyle|border: none; padding: 0;}}}
is not the same as
{{#if:{{{framestyle|}}} |{{{framestyle}}} |border: none; padding: 0;}}
The difference is when 'framestyle =' is present, but blank. In the first case, a blank value is used, while in the second case, 'border: none; padding: 0;' is used.
See also
mk:Шаблон:Странична лента со расклопни списоци/ред ja:Template:Sidebar with collapsible lists/row sl:Predloga:Sidebar with collapsible lists/row ur:سانچہ:Sidebar with collapsible lists/row
The above documentation is transcluded from Template:Sidebar with collapsible lists/row/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |