Difference between revisions of "Template:TblOneCell"

From WikiCorporates
Jump to navigation Jump to search
(Created page with "<table class="mw-collapsible{{{1|}}}" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}" style="width:100%; text-align:left; border:1px solid #8488dc; margin:0.2e...")
 
 
(29 intermediate revisions by the same user not shown)
Line 1: Line 1:
−
<table class="mw-collapsible{{{1|}}}" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}" style="width:100%; text-align:left; border:1px solid #8488dc; margin:0.2em auto auto; padding:0px; border-collapse:collapse; clear:both;">
+
<table class="tblOneCell mw-collapsible {{#if:{{{state|}}}||mw-collapsed}}" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}" style="{{#if:{{{width|}}}|width:{{{width}}}|width:100%}}; {{#if:{{{mtop|}}}|margin-top:{{{mtop}}};|}} padding:0px; text-align:left; border:1px solid #8488dc; border-collapse:collapse;">
−
<tr><td style="border-bottom:1px solid #8488dc; background-color:#f5f5ff; font-size:87%; padding:0.1em 0.8em; text-align:left;"><span style="font-size:115%; font-weight:bold;">{{{2}}}</span></td>
+
<tr><td style="padding:0.1em 0.8em; border-bottom:1px solid #8488dc; background-color:#f5f5ff;">{{#if:{{{title|}}}|{{#if:{{{hdr|}}}|<{{{hdr}}}>{{{title}}}</{{{hdr}}}>|<h4>{{{title}}}</h4>}}|<b>{{{text|}}}</b>}}</td></tr>
−
</tr>
+
<tr><td style="padding:0.3em 0.3em 0.3em 0; background-color:#ffffff;">
−
<tr><td style="padding:0.3em 0; background-color:white;">
+
{{{content}}}
−
{{{3}}}
 
 
</td></tr>
 
</td></tr>
−
</table><noinclude>[[Category:WikiPolitiks templates]]</noinclude>
+
</table><noinclude>{{doc2}}</noinclude>
−
<noinclude>
 
−
<table class="mw-collapsible mw-collapsed" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}" style="width:100%; text-align:left; border:1px solid #8488dc; margin:0.2em auto auto; padding:0px; border-collapse:collapse; clear:both;">
 
−
<tr><td style="border-bottom:1px solid #8488dc; background-color:#f5f5ff; font-size:87%; padding:0.1em 0.8em; text-align:left;"><span style="font-size:115%; font-weight:bold;">{{{2}}}</span></td>
 
−
</tr>
 
−
<tr><td style="padding:0.3em 0; background-color:white;">
 
−
{{{3}}}
 
−
</td></tr>
 
−
</table>
 
−
<noinclude>
 

Latest revision as of 16:22, 5 July 2019

{{{content}}}

[edit] Documentation


Information icon4.svg Use with care; content within the closed template is not visible to an in-page text search.

Usage

This table-based template can be used to hide content. For a good working example, see Foreign Policy Centre

The parameters are:

| width    - Optional; defaults to 100%
| state    - Optional; default start-up state = closed
| mtop     - Optional; default top margin = 0
| title    - The title; in bold + will show in the TOC
-- OR --
| text     - The title, in bold + will *not* show in the TOC
| content  - Whatever content you want to put in here. Note the container is one table cell.

Simple Example

{{TblOneCell|title=Structure|mtop=1em|hdr=h3|content=
... ...
}}

Gives:

Structure

... ...

All Parameters Example

{{TblOneCell
|width   = 80%
|state   = open
|mtop    = 1em
|title   = Board of Directors 2018/2019
|content =
* Chair: [[Audrey Glover|Dame Audrey Glover]]
* Trustee: [[Gemma Doyle]]
* Trustee: [[Principle Consulting|Becky Hug]]
}}

Gives:

Board of Directors 2018/2019