Template:Collapsible: Difference between revisions

From FBSA Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
! style="border-top: 2px solid #ddd; border-bottom:2px solid #ddd; margin:1em; padding:0.2em;" | '''{{{header|}}}''   '''
! style="border-top: 2px solid #ddd; border-bottom:2px solid #ddd; margin:1em; padding:0.2em;" | '''{{{header|}}}''   '''
|-
|-
|{{{1}}}
|{{#if: {{{contents|}}} | {{{contents}}} | {{{1}}} }}
|-
|-
|style="border-top: 2px solid #ddd; border-bottom:2px solid #ddd; margin:1em; padding:0.2em;" | '''{{{footer|}}}'' '''
|style="border-top: 2px solid #ddd; border-bottom:2px solid #ddd; margin:1em; padding:0.2em;" | '''{{{footer|}}}'' '''
Line 15: Line 15:
Header with footer
Header with footer
{{Collapsible|Awesome!|header="This is a header with a footer!"|footer="The aforementioned footer!"}}
{{Collapsible|Awesome!|header="This is a header with a footer!"|footer="The aforementioned footer!"}}
User set order
{{Collapsible|header="Don't like  the order this comes in?"|contents=You can put <i>whatever</i> you want here!|footer=NEATO!}}


Adaptation of [[Template:Spoilers]] using MediaWiki collapsible tables to keep the information concealed unless the reader specifically expands the section to read them. I basically just copy-pasted what they did and added additional parameters so you can put in whatever you want.
Adaptation of [[Template:Spoilers]] using MediaWiki collapsible tables to keep the information concealed unless the reader specifically expands the section to read them. I basically just copy-pasted what they did and added additional parameters so you can put in whatever you want for the header text and the text that appears in the footer. Go nuts.
 
Code samples:
 
<pre>No Settings
<nowiki>{{Collapsible|This collapses!}}</nowiki>
Header
<nowiki>{{Collapsible|Neat!|header="This is a header!"}}</nowiki>
Footer
<nowiki>{{Collapsible|Cool!|footer="This is a footer!"}}</nowiki>
Header with footer
<nowiki>{{Collapsible|Awesome!|header="This is a header with a footer!"|footer="The aforementioned footer!"}}</nowiki>
User set order
<nowiki>{{Collapsible|header="Don't like  the order this comes in?"|contents=You can put <i>whatever</i> you want here!|footer=NEATO!}}</nowiki></pre>


[[Category:Templates]]</noinclude>
[[Category:Templates]]</noinclude>

Latest revision as of 21:47, 13 April 2022


No Settings

   
This collapses!

Header

"This is a header!"   
Neat!

Footer

   
Cool!
"This is a footer!"

Header with footer

"This is a header with a footer!"   
Awesome!
"The aforementioned footer!"

User set order

"Don't like the order this comes in?"   
You can put whatever you want here!
NEATO!

Adaptation of Template:Spoilers using MediaWiki collapsible tables to keep the information concealed unless the reader specifically expands the section to read them. I basically just copy-pasted what they did and added additional parameters so you can put in whatever you want for the header text and the text that appears in the footer. Go nuts.

Code samples:

No Settings
{{Collapsible|This collapses!}}
Header
{{Collapsible|Neat!|header="This is a header!"}}
Footer
{{Collapsible|Cool!|footer="This is a footer!"}}
Header with footer
{{Collapsible|Awesome!|header="This is a header with a footer!"|footer="The aforementioned footer!"}}
User set order
{{Collapsible|header="Don't like  the order this comes in?"|contents=You can put <i>whatever</i> you want here!|footer=NEATO!}}