Difference between revisions of "Template:Sidebar"
From Goon Wiki
Ratknight1 (talk | contribs) |
Ratknight1 (talk | contribs) |
||
Line 2: | Line 2: | ||
{{#if:{{{image|}}}|{{{image}}}<br />|}} | {{#if:{{{image|}}}|{{{image}}}<br />|}} | ||
'''<big>{{{title|Sidebar Title}}}</big>''' | '''<big>{{{title|Sidebar Title}}}</big>''' | ||
<div class="mw-collapsible {{#switch:{{{group1collapsed}}}|yes=mw-collapsed|no=}}" data-expandtext="▼" data-collapsetext="▲" style="background:3d3d3d;border-top:1px solid white;color: | <div class="mw-collapsible {{#switch:{{{group1collapsed}}}|yes=mw-collapsed|no=}}" data-expandtext="▼" data-collapsetext="▲" style="background:3d3d3d;border-top:1px solid white;color:c1c1c1"> | ||
'''{{{group1|Group 1 Title}}}''' | '''{{{group1|Group 1 Title}}}''' | ||
<div class="mw-collapsible-content" style="background:#c1c1c1;color:black" > | <div class="mw-collapsible-content" style="background:#c1c1c1;color:black" > | ||
Line 8: | Line 8: | ||
</div></div> | </div></div> | ||
{{#if:{{{group2|}}}| | {{#if:{{{group2|}}}| | ||
<div class="mw-collapsible {{#switch:{{{group2collapsed}}}|yes=mw-collapsed|no=}}" data-expandtext="▼" data-collapsetext="▲" style="background: | <div class="mw-collapsible {{#switch:{{{group2collapsed}}}|yes=mw-collapsed|no=}}" data-expandtext="▼" data-collapsetext="▲" style="background:3d3d3d;color:c1c1c1"> | ||
'''{{{group2}}}''' | '''{{{group2}}}''' | ||
<div class="mw-collapsible-content" style="background:# | <div class="mw-collapsible-content" style="background:#c1c1c1;color:black" > | ||
{{{content2|Group 2 Content}}} | {{{content2|Group 2 Content}}} | ||
</div></div> | </div></div> | ||
| }} | | }} | ||
{{#if:{{{group3|}}}| | {{#if:{{{group3|}}}| | ||
<div class="mw-collapsible {{#switch:{{{group3collapsed}}}|yes=mw-collapsed|no=}}" data-expandtext="▼" data-collapsetext="▲" style="background: | <div class="mw-collapsible {{#switch:{{{group3collapsed}}}|yes=mw-collapsed|no=}}" data-expandtext="▼" data-collapsetext="▲" style="background:3d3d3d;color:c1c1c1"> | ||
'''{{{group3}}}''' | '''{{{group3}}}''' | ||
<div class="mw-collapsible-content" style="background:# | <div class="mw-collapsible-content" style="background:#c1c1c1;color:black" > | ||
{{{content3|Group 3 Content}}} | {{{content3|Group 3 Content}}} | ||
</div></div> | </div></div> | ||
| }} | | }} | ||
{{#if:{{{group4|}}}| | {{#if:{{{group4|}}}| | ||
<div class="mw-collapsible {{#switch:{{{group4collapsed}}}|yes=mw-collapsed|no=}}" data-expandtext="▼" data-collapsetext="▲" style="background: | <div class="mw-collapsible {{#switch:{{{group4collapsed}}}|yes=mw-collapsed|no=}}" data-expandtext="▼" data-collapsetext="▲" style="background:3d3d3d;color:c1c1c1"> | ||
'''{{{group4}}}''' | '''{{{group4}}}''' | ||
<div class="mw-collapsible-content" style="background:# | <div class="mw-collapsible-content" style="background:#c1c1c1;color:black" > | ||
{{{content4|Group 4 Content}}} | {{{content4|Group 4 Content}}} | ||
</div></div> | </div></div> | ||
| }} | | }} | ||
{{#if:{{{group5|}}}| | {{#if:{{{group5|}}}| | ||
<div class="mw-collapsible {{#switch:{{{group5collapsed}}}|yes=mw-collapsed|no=}}" data-expandtext="▼" data-collapsetext="▲" style="background: | <div class="mw-collapsible {{#switch:{{{group5collapsed}}}|yes=mw-collapsed|no=}}" data-expandtext="▼" data-collapsetext="▲" style="background:3d3d3d;color:c1c1c1"> | ||
'''{{{group5}}}''' | '''{{{group5}}}''' | ||
<div class="mw-collapsible-content" style="background:# | <div class="mw-collapsible-content" style="background:#c1c1c1;color:black" > | ||
{{{content5|Group 5 Content}}} | {{{content5|Group 5 Content}}} | ||
</div></div> | </div></div> |
Latest revision as of 19:07, 10 November 2021
Sidebar Title
Group 1 Title
Group 1 Content
[edit] Template documentation
This is a meta-template for use in creating other sidebar templates, like Template:Sidebar Newbee.
Call this template by invoking {{Sidebar}}. the template assumes that at least the following parameters will be called:
- title: This sets the title of the sidebar. If not set, it defaults to Sidebar Title.
- group1: This sets the first sub-heading of the sidebar. If not set, it defaults to Group 1 Title.
- content1: This sets the content for the first group. If not set, it defaults to Group 1 Content.
- bottom: This sets the static bottom link for a sidebar, typically Other Guides. If not set, it defaults to a non-breakable space.
The template supports up to 5 groups. If you set a group without setting content, the parameter for that content defaults to Group # Content. Not setting a group at all results in it simply not appearing.
All groups also have a switchable parameter called group#collapsed (where # is the group number, IE group1collapsed), which sets if the group is collapsed by default or not.
There is also an image parameter which can be used to set an image to be used above the title.