Details Shortcode

The details shortcode specifies additional details that the user can open and close on demand.

Syntax

1{{% details [summary] [open] %}}
2CONTENT
3{{% /details %}}

Parameters

summary

PositionNameTypeDefaultRequired
#0summarystring-Y

The summary of details.

open

PositionNameTypeDefaultRequired
#1openbooleanfalse-

When true, expand the details by default.

Examples

Collapsed Details Example

hello.php
1echo "Hello world!";

Source code.

1{{% details "hello.php" %}}
2```php
3echo "Hello world!";
4```
5{{% /details %}}

Expanded Details Example

hello.js
1console.log("Hello world!");

Source code.

1{{% details "hello.js" true %}}
2```js
3console.log("Hello world!");
4```
5{{% /details %}}