Concertinas
module_concertinas
This module can be activated by applying the tag module_concertinas to a published basic subpage.
#Data Mappings
- Module header = basic page headline
- Module content = basic page content
- a concertina will be rendered for each nested basic page
- Concertina button text = basic page headline
- Concertina content = basic page content
Simple Single Concertina
If you don't have nested children pages underneath your main module - instead a simple single concertina will be generated instead (without header and text above concertina).
Data mappings
- Concertina button text = basic page headline
- Concertina content = basic page content
Read more inside a concertina
Each concertina supports the same progressive reveal as the Read More module. This lets you show a short answer when someone opens a concertina, with a Read more button to reveal the remaining detail.
Setup
- Open the Basic page that supplies the individual concertina's content. With nested child pages, edit the relevant child. For a single concertina without children, edit the module page itself.
- In its WYSIWYG editor, add the introduction or short answer.
- Insert a horizontal rule (
<hr>) where the hidden content should begin, then add the remaining content below it. - Publish the content page and the module page. Keep the
module_concertinastag on the module page; you do not need to addmodule_read_more.
For example, the concertina's Basic content could be:
<p>A short answer shown when the concertina is opened.</p>
<hr>
<p>Further detail revealed when the visitor selects Read more.</p>
How it works
- Opening the concertina shows the content before the first
<hr>and a Read more button in place of that divider. - Everything after the divider stays hidden until the visitor selects Read more.
- The revealed content replaces the button. There is no separate “Read less” control; the concertina can still be opened and closed normally.
- Each concertina is processed independently, so each item can have its own divider and reveal.
- Without an
<hr>, all of the concertina's content is shown when it is opened.
For multiple concertinas, put the divider in each child page's content, rather than in the module's introductory content above the concertinas.