Template:Show more

From Portals of Phereon Wiki
Revision as of 08:00, 25 December 2020 by Kozd (talk | contribs)
[view | edit | purge]Documentation


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:

I am always visible

Show moooreShow lessss

Template data

Adds a show more button that expands to show the content given to the template

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Contentcontent 1

This is the content that expands after pressing the button

Contentrequired
"Show more" textmore

Replaces the default "Show more" text with something else

Default
Show more
Stringoptional
"Show less" textless

Replaces the default "Show less" text with something else

Default
Show less
Stringoptional
Stylingstyle

You can add CSS styling for the content here

Unknownoptional
Wrapper stylingwrapperstyle

You can add CSS styling for the content here

Unknownoptional
Button stylingbuttonstyle

You can add CSS styling for the button here

Unknownoptional
Visiblevisible

Optional bit of text that is always visible before the collapsing part. Usually you can just leave this outside the template instead

Stringoptional
Visible stylingvisiblestyle

CSS style applied to the always-visible text

Unknownoptional
[view | edit | purge]The above documentation is transcluded fromTemplate:Show more/doc.