Difference between revisions of "Template:Divhide/testcases"

From blackwiki
Jump to navigation Jump to search
imported>DePiep
imported>DePiep
 
Line 2: Line 2:
 
==if preview==
 
==if preview==
 
:{{para|show|preview}}: will show in preview only.
 
:{{para|show|preview}}: will show in preview only.
 +
: {{tl|divhide/sandbox}}
 
;show=preview
 
;show=preview
{{divhide|Test|show=preview}}
+
{{divhide/sandbox|Test|show=preview}}
 
These are the hidden contents.
 
These are the hidden contents.
 
Only show when in preview.
 
Only show when in preview.
Line 9: Line 10:
  
 
;show=yes
 
;show=yes
{{divhide|Test|show=yes}}
+
{{divhide/sandbox|Test|show=yes}}
 
These are the hidden contents.
 
These are the hidden contents.
 
{{divhide|end}}
 
{{divhide|end}}
  
 
;test show=foo
 
;test show=foo
 +
{{divhide/sandbox|Test|show=foo}}
 +
These are the hidden contents.
 +
{{divhide|end}}
 +
 +
;test show=foo notsandbox
 
{{divhide|Test|show=foo}}
 
{{divhide|Test|show=foo}}
 
These are the hidden contents.
 
These are the hidden contents.
 
{{divhide|end}}
 
{{divhide|end}}
 
  
 
== Usage ==
 
== Usage ==

Latest revision as of 16:03, 15 February 2019

if preview

|show=preview: will show in preview only.
{{divhide/sandbox}}
show=preview
Test

These are the hidden contents. Only show when in preview.

show=yes
Test

These are the hidden contents.

test show=foo
Test

These are the hidden contents.

test show=foo notsandbox
Test

These are the hidden contents.

Usage

(from /doc page)

This template will allow you to collapse a section of a page. The first parameter is the title of the collapse section, and the second (optional parameter) is the width. To close the section, use {{divhide|end}}.

1st parameter

The first unnamed parameter is used at the top for the title and at the bottom to mark the end of the hidden section.

{{divhide|Test}}
These are the hidden contents.
{{divhide|end}}
Test

These are the hidden contents.

2nd parameter

The second unnamed parameter is used to specify the width.

{{divhide|Half test|50%}}
These are the hidden contents, and the box only takes up 50% of the page.
{{divhide|end}}
Half test

These are the hidden contents, and the box only takes up 50% of the page.

width parameter

The width parameter may be used to specify the width.

{{divhide|Width test|width=75%}}
These are the hidden contents, and the box only takes up 75% of the page.
{{divhide|end}}
Width test

These are the hidden contents, and the box only takes up 75% of the page.

show parameter

The parameter |show=yes may be used to show the contents by default.

{{divhide|Show test|show=yes}}
This section is shown by default.
{{divhide|end}}
Show test

This section is shown by default.

color parameter

The color parameter may be used to specify the background color.

{{divhide|Color test|color=#90EE90}}
The header of this section has different background color.
{{divhide|end}}
Color test

The header of this section has different background color.