Drupal's CKEditor Accordion module provides the ability to create and display content in an accordion, aka a list of headers that can be clicked to show or hide content. Accordions are often used for FAQs and other situations where it is helpful to provide an overview and allow users to expose content a little at a time.
Getting started
CKEditor Accordion is not turned on by default for all sites. Contact SCLS staff to have it enabled for your site. Once enabled, it adds a button to the editing toolbar which inserts an accordion.
Adding an accordion to your content
- Create a new content node on your site (e.g. article, basic page, etc.).
- Click the Insert accordion button (Image
- Change the prefilled text in each section to your content (otherwise your published page will display "Accordion tab 1," etc.). The very top "Accordion" label (just inside the dashed red outline) will not be shown.
Image - To add a third tab do the following:
- Right-click inside the accordion element.
- Select Add accordion tab before/after.
Image
- Save the content node.
The top accordion tab will be open by default. There is an alternate setting to keep all tabs closed by default. Contact SCLS staff if you want your site to use this alternate setting.
Removing accordion tabs
- Place the cursor in the section you wish to remove.
- Right-click inside the accordion element.
- Select Remove accordion tab.
- Save the content node.