Template:Hide
Jump to navigation
Jump to search
Want an adless experience? Log in or Create an account.
[show]
Purpose
This template handles switching between two displayed items. It's meant to be used in conjunction with Template:Content and will not function without it.
Usage
NOTE: This template CANNOT be used alone. It MUST be used in conjuction with the Content template.
To use this template, use either the standard format {{Hide| ID | show | hide }} or the named parameter format:
{{Content |id= |show= |hide= }}
- id — This is some one word name used to identify the template. This is what you use to match the link formed by this template to the content you'd like to switch between. The id should be unique and only contain letters. Numbers will break the formatting and can possibly cause conflicts with anything similarly named. (Required )
- show — This specifies the text of the link that shows the content that is initially hidden. (Optional - [show])
- hide — This specifies the text of the link that switches the content back to what was initially displayed. (Optional - [hide])
Example
To use this to set up a traditional show-type template that has nothing initially displayed, use something like the following:
{{switch|id=example}} {{content|id=example|hide=This is hidden text.}}
This results in:
[show]
To make the opposite effect, use the following:
{{switch|id=exampleB|show=[hide]|hide=[show]}} {{content|id=exampleB|show=This text can be hidden.}}
This results in:
[hide]