Some more text
test
test se
tsets
asfgasddddddsasdasdasdasdasd
Template:Show more: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly><div class="toggle-content-wrapper"> |
<includeonly><div class="toggle-content-wrapper"> |
||
<div class=" |
<div class="fulltext"> |
||
<span> |
<span>Some more text |
||
test <br> |
|||
⚫ | |||
test se<br> |
|||
-->{{#Widget:Show more|more={{{more|Show more}}}|less={{{less|Show less}}}}} |
|||
tsets<br> |
|||
⚫ | |||
asfgasddddddsasdasdasdasdasd</span> |
|||
⚫ | |||
<div class="toggle-content" style="display: none;"> |
|||
<span class="more">Show More</span> |
|||
<span class="less">Show Less</span> |
|||
⚫ | |||
{{doc}} |
{{doc}} |
||
</noinclude> |
</noinclude> |
Revision as of 10:29, 31 December 2019
Usage
Adds a show more button that expands to show the given content.
{{Show more|Content goes here|more=Show more|less=Show less}}
(see TemplateData for more)
Cerain wiki text markup seems to make the content not show up, most notably headings. You can use the html tag equivelants instead.
Example
Using this:
{{Show more |more=Show mooore |less=Show lessss |visible=<h1>I am always visible</h1> |wrapperstyle=border: dotted 3px black; width: 75%; margin: 0 auto; |style=margin: 0 1em; |visiblestyle=margin: 0 1em; |<h3>But there is more text here!</h3> {{Lorem ipsum}} }}
Outputs:
Template data
Adds a show more button that expands to show the content given to the template
Parameter | Description | Type | Status | |
---|---|---|---|---|
Content | content 1 | This is the content that expands after pressing the button | Content | required |
"Show more" text | more | Replaces the default "Show more" text with something else
| String | optional |
"Show less" text | less | Replaces the default "Show less" text with something else
| String | optional |
Styling | style | You can add CSS styling for the content here | Unknown | optional |
Wrapper styling | wrapperstyle | You can add CSS styling for the content here | Unknown | optional |
Button styling | buttonstyle | You can add CSS styling for the button here | Unknown | optional |
Visible | visible | Optional bit of text that is always visible before the collapsing part. Usually you can just leave this outside the template instead | String | optional |
Visible styling | visiblestyle | CSS style applied to the always-visible text | Unknown | optional |