Accordions Custom Block
Accordions are available as custom blocks. Accordions are expanders and will open to show additional content. A great use for accordions is for a list of frequently asked questions or sectioning policies or departments. Accordions prevent pages from getting too lengthy by dividing, then hiding, long sections of information. Instead of scrolling through all the content, viewers can click to open a specific section of information.
Each accordion has a title; the part that is clicked for expansion. The part that expands allows for a full editing toolbar. This means that any sort of information you can add to body content of a page, such as an image or embed code, can also be displayed in the expanding section of an accordion.
Things to Note
- There is one style for accordions, using the brand blue.
- Accordion option available: "Allow Multiple Accordion Items Open". This will enable multiple to be open at once, otherwise, only one will be open at a time.
- Accordion option available: "Allow All Accordion Items to be Closed". If this is selected, then all accordions can be closed, otherwise, the last one clicked will remain open.
- One accordion can be open by default with a check box in the proper accordion item.
- When using source mode on an item, be sure to click back to regular edit mode (by clicking on source again), before opening a new item or saving.
How to Create an Accordion
Editors and Site builders are able to create Accordions. It is an option in the Custom Block Library. Once an Accordion has been created, it will be added to the custom block library.
Creation through the Custom Block Library
- On the admin panel, navigate to Structure -> Block Layout -> Custom Block Library
- Click the blue "Add custom block" button
- Select "Accordions" from the list
- Give your Accordion a unique custom block name
- In the "Introduction" tab, optionally add any content you want to display above the accordion.
- In the "Accordion Info" tab, select if you want visitors to have multiple accordion items open at once and if you want visitors to be able to close all accordion items.
- Accordion Title is the part that will clickable to expand for more information. Accordion Body will display once the accordion has been clicked by the visitor.
- Check the box "Open by Default" on one accordion that you want to be open by default. This is optional.
- Click "Add Accordion" to add additional accordions.
- To remove accordions, click on "Remove" next to the accordion item that needs to be removed.
- Hold down the arrow crosshair to move accordion items in the proper order.
- By default, the block is in draft and will not display to those viewing the site, only to authenticated (logged in) users. Once you are ready for the updates to publish, change the state to "Published".
- Click Save