Template:Hidden: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
Undo revision 10904 by Caleb Cooper (talk)
Tag: Undo
 
(8 intermediate revisions by 2 users not shown)
Line 1:
{{hidden begin|collapsetext={{{collapsetext|}}}|expandtext={{{expandtext|}}}|toggle={{{showhide|}}}{{{toggle|}}}|expanded={{{expand|{{{expanded|}}}}}}|class={{{class|}}}|border={{{border|none}}}|style={{{style|{{{css|}}}}}}
|bg1={{{bg1|transparent}}}|ta1={{{ta1|center}}}|titlestyle={{#if:{{{multiline|{{{multi-line|}}}}}}|height:auto;}}{{#ifeq:{{{fw1|bold}}}|bold||font-weight:{{{fw1|bold}}};}}{{{headercss|{{{headerstyle|{{{titlestyle|}}}}}}}}}
|title={{#if:{{{multiline|{{{multi-line|}}}}}}|<div style="margin-right:4em;line-height:125%;height:auto;">{{{title|{{{header|{{{1}}}}}}}}}</div>|{{{title|{{{header|{{{1|<noinclude>Header Text</noinclude>}}}}}}}}}}}
|bg2={{{bg2|transparent}}}|ta2={{{ta2|left}}}|contentstyle={{#ifeq:{{{fw2|normal}}}|normal||font-weight:{{{fw2|normal}}};}}{{{contentcss|{{{contentstyle|}}}}}} }}
{{#ifeq: {{{hlist|}}} | true |<div class="hlist">
{{{content|{{{contents|{{{text|{{{2}}}}}}}}}}}}{{hidden end}}{{#if:{{{bg1|}}}{{{bg2|}}}{{{ta1|}}}{{{ta2|}}}{{{fw1|}}}{{{fw2|}}}|[[Category:Hidden templates using styles|{{NAMESPACE}}{{PAGENAME}}]]}}
{{{content|{{{contents|{{{text|{{{2|<noinclude>Content Body Text</noinclude>}}}}}}}}}}}}
</div> | {{{content|{{{contents|{{{text|{{{2|<noinclude>Content Body Text</noinclude>}}}}}}}}}}}} }}
</div></div>{{hidden end}}
<noinclude>
 
Line 28 ⟶ 31:
 
====Optional====
 
 
; style : CSS styling for template overall.
; headerstyle : CSS styling for title (header).
Line 35 ⟶ 40:
; toggle left : setting {{para|toggle|left}} will display "Expand" or "Collapse" at the left side of the page
; border : any valid css for border styles (e.g. {{para|border|6px solid red}})
; hlist : formats content text body as horizontal list (e.g. {{para|hlist|true}})
 
 
{{Note|There are many additional parameters added for backwards compatibility with Templates copied from mediawiki or wikipedia, see template data below for full list}}
Line 55 ⟶ 60:
| {{rh}} | Result
| {{{{PAGENAMETDOC}}|Title text here|Body text line 1<br/>Body text line 2}}
|}
 
Alternative Display:
In this example only the two required parameters are specified.
{| class="wikitable"
| {{rh}} | Code
| <pre>{{Hidden|Title text here|Body text line 1<br/>Body text line 2|toggle=left|expandtext="+"|contentstyle = text-align: left|ta1 = left}}</pre>
|-
| {{rh}} | Result
| {{{{PAGENAMETDOC}}|Title text here|Body text line 1<br/>Body text line 2|toggle=left|expandtext="+"|contentstyle = text-align: left|ta1 = left}}
|}
 
Line 91 ⟶ 106:
| {{{{PAGENAMETDOC}}|Title text here|Body text line 1<br/>Body text line 2|border=3px solid black|toggle=left|collapsetext="-"|expandtext="+"}}
|}
 
=== Expanded by default using hlist ===
{| class="wikitable"
| {{rh}} | Code
| <source lang="css" style="overflow:auto;">
{{hidden
|Horizontal List
|
*Bullet 1
*Bullet 2
*Bullet 3
|collapsetext="-"
|expandtext="+"
|expanded=on
|hlist=true
}}
</source>
|-
| {{rh}} | Result
| {{{{PAGENAMETDOC}}|Horizontal List|
*Bullet 1
*Bullet 2
*Bullet 3
|collapsetext="-"|expandtext="+"|expanded=on|hlist=true}}
|}
 
 
===CSS===
Line 234 ⟶ 275:
"description": "Text to replace \"Expand\" toggle",
"example": "expandtext=\"+\"",
"type": "string"
},
"hlist": {
"description": "Formats content body as horizontal list",
"example": "hlist=true",
"type": "string"
}