2017-08-20 17:10:29 +02:00
|
|
|
---
|
|
|
|
title : Expand
|
|
|
|
description : "Displays an expandable/collapsible section of text on your page"
|
|
|
|
---
|
|
|
|
|
|
|
|
The Expand shortcode displays an expandable/collapsible section of text on your page.
|
2021-07-16 22:35:20 +02:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
````
|
2021-07-16 23:51:11 +02:00
|
|
|
{{%/* expand "Does this relearn theme rock?" { "true" | "false" } */%}}
|
2021-07-16 22:35:20 +02:00
|
|
|
Yes!
|
2021-07-16 23:51:11 +02:00
|
|
|
{{%/* /expand */%}}
|
2021-07-16 22:35:20 +02:00
|
|
|
````
|
|
|
|
|
2021-07-16 23:51:11 +02:00
|
|
|
The first optional parameter defines the text that appears next to the expand/collapse icon. The default text is `"Expand me..."`.
|
2021-07-16 22:35:20 +02:00
|
|
|
|
2021-07-16 23:51:11 +02:00
|
|
|
The second optional parameter controls if the block is initially shown as expanded (`"true"`) or collapsed (`"false"`). The default ist `"false"`.
|
2021-07-16 22:35:20 +02:00
|
|
|
## Examples
|
|
|
|
|
2021-07-16 23:51:11 +02:00
|
|
|
### All defaults
|
2017-08-20 17:10:29 +02:00
|
|
|
|
2021-07-16 23:51:11 +02:00
|
|
|
{{% expand %}}
|
2017-08-20 17:10:29 +02:00
|
|
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
|
|
|
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
|
|
|
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
|
|
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
|
|
|
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
|
|
|
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
2021-07-16 23:51:11 +02:00
|
|
|
{{% /expand %}}
|
2021-07-16 22:35:20 +02:00
|
|
|
|
|
|
|
{{% expand "Show markup" %}}
|
|
|
|
````
|
|
|
|
{{%/* expand */%}}
|
|
|
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
|
|
|
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
|
|
|
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
|
|
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
|
|
|
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
|
|
|
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
|
|
{{%/* /expand */%}}
|
|
|
|
````
|
2021-07-16 23:51:11 +02:00
|
|
|
{{% /expand %}}
|
|
|
|
|
|
|
|
### Initially expanded
|
|
|
|
|
|
|
|
{{% expand "Expand me..." "true" %}}
|
|
|
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
|
|
|
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
|
|
|
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
|
|
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
|
|
|
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
|
|
|
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
|
|
{{% /expand %}}
|
|
|
|
|
|
|
|
{{% expand "Show markup" %}}
|
|
|
|
````
|
|
|
|
{{%/* expand "Expand me..." "true" */%}}
|
|
|
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
|
|
|
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
|
|
|
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
|
|
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
|
|
|
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
|
|
|
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
|
|
{{%/* /expand */%}}
|
|
|
|
````
|
|
|
|
{{% /expand %}}
|
2017-08-20 17:10:29 +02:00
|
|
|
|
2021-07-16 22:35:20 +02:00
|
|
|
### Arbitrary text
|
2017-08-20 17:10:29 +02:00
|
|
|
|
2021-07-16 23:51:11 +02:00
|
|
|
{{% expand "Show me endless possibilities" %}}
|
2021-07-16 22:35:20 +02:00
|
|
|
Some expandable text.
|
2017-08-20 17:10:29 +02:00
|
|
|
|
2021-07-16 22:35:20 +02:00
|
|
|
You can add:
|
2017-08-20 17:10:29 +02:00
|
|
|
|
2021-07-16 22:35:20 +02:00
|
|
|
- multiple paragraphs
|
|
|
|
- bullet point lists
|
|
|
|
- *emphasized*, **bold** and even ***bold emphasized*** text
|
|
|
|
- [links](https://example.com)
|
|
|
|
- other shortcodes besides `expand`
|
|
|
|
- etc.
|
2017-08-20 17:10:29 +02:00
|
|
|
|
2021-07-16 22:35:20 +02:00
|
|
|
```
|
|
|
|
...and even source code
|
|
|
|
```
|
2017-08-20 17:10:29 +02:00
|
|
|
|
2021-07-16 22:35:20 +02:00
|
|
|
> the possiblities are endless
|
|
|
|
{{% /expand%}}
|
2017-08-20 17:10:29 +02:00
|
|
|
|
2021-07-16 22:35:20 +02:00
|
|
|
{{% expand "Show markup" %}}
|
|
|
|
````
|
|
|
|
{{%/* expand "Show me endless possibilities" */%}}
|
|
|
|
Some expandable text.
|
2017-08-20 17:10:29 +02:00
|
|
|
|
2021-07-16 22:35:20 +02:00
|
|
|
You can add:
|
2017-08-20 17:10:29 +02:00
|
|
|
|
2021-07-16 22:35:20 +02:00
|
|
|
- multiple paragraphs
|
|
|
|
- bullet point lists
|
|
|
|
- *emphasized*, **bold** and even ***bold emphasized*** text
|
|
|
|
- [links](https://example.com)
|
|
|
|
- other shortcodes besides `expand`
|
|
|
|
- etc.
|
|
|
|
|
|
|
|
```
|
|
|
|
...and even source code
|
|
|
|
```
|
|
|
|
|
|
|
|
> the possiblities are endless
|
|
|
|
{{%/* /expand */%}}
|
|
|
|
````
|
2021-07-16 23:51:11 +02:00
|
|
|
{{% /expand %}}
|