Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Usage  





2 Examples  



2.1  Compare template and sandbox (default format)  





2.2  Compare two different templates (default format)  





2.3  Compare template and sandbox (rows format)  





2.4  Compare template and sandbox (columns format)  





2.5  Compare template and sandbox (inline format, show code)  







3 See also  














Template:Collapsible 2 test case






Slovenščina
ி

Tiếng Vit
 

Edit links
 









Template
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


This template creates a test case of two or more templates contained in a collapsible box. If the outputs of all the templates is the same, the box is collapsed, but if any of them differ from each other the box is left uncollapsed. There are a variety of different formats and options that can be used.

Each template is called with the same parameters. All parameters passed to this template are passed through to the test-case templates, with the exception of parameters starting with an underscore character ("_"), which are reserved for internal use.

If no templates are specified explicitly, the module uses the base page of the current page as the first template, and its /sandbox subpage as the second template. If only one template is specified explicitly, its /sandbox subpage is used as the second template.

Usage[edit]

Basic syntax

{{collapsible test case
| [param1] = [value1]
| [param2] = [value2]
| [param3] = [value3]
...
}}

Full syntax

For the full syntax, see Template:Test case. This template is equivalent to that one with the |_collapsible= parameter set to "yes" by default.

Examples[edit]

Compare template and sandbox (default format)[edit]

Usage
{{collapsible test case
| _template1 = ombox
| text = Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut tristique sagittis cursus.
}}
Output

{{ombox}}

{{ombox}}

{{ombox/sandbox}}

Compare two different templates (default format)[edit]

Usage
{{collapsible test case
| _template1 = ombox
| _template2 = tmbox
| text = Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut tristique sagittis cursus.
}}
Output

{{ombox}}

{{ombox}}

{{tmbox}}

Compare template and sandbox (rows format)[edit]

Usage
{{collapsible test case
| _format = rows
| _template1 = ombox
| text = Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut tristique sagittis cursus.
}}
Output

{{ombox}}

{{ombox}}
{{ombox/sandbox}}

Compare template and sandbox (columns format)[edit]

Usage
{{collapsible test case
| _format = columns
| _template1 = ombox
| text = Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut tristique sagittis cursus.
}}
Output

{{ombox}}

Side by side comparison
{{ombox}}{{ombox/sandbox}}

Compare template and sandbox (inline format, show code)[edit]

Usage
{{collapsible test case
| _format = inline
| _showcode = yes
| _template1 = ombox
| text = Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut tristique sagittis cursus.
}}
Output

{{ombox}}

  • {{ombox |text=Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut tristique sagittis cursus.}}
  • {{ombox/sandbox |text=Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut tristique sagittis cursus.}}
  • See also[edit]

    Templates invoking Module:Template test case:


    Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Collapsible_2_test_case&oldid=913742983"

    Categories: 
    Lua-based templates
    Talk message boxes
    Template test cases
    Template namespace templates
     



    This page was last edited on 2 September 2019, at 23:10 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki