Insert collapsible content
Collapsible content is great for having a lot of content on one page in a format that allows users to easily scan content and expand only the content that is relevant for them. It can be useful for FAQs, policies, or details on a variety of products. Collapsible content can easily be added in the Rich Text Editor when editing an intranet page.
Titles or summaries of collapsible content display with an arrow or caret icon beside them to indicate that the content can be expanded and display more content. When the content is collapsed, the arrow/caret points right, when the content is expanded the arrow/caret points down.
Collapsible content on a page is collapsed by default when someone views it. The user can expand and collapse content as desired. When the user visits the page again the content will be collapsed regardless of whether they expanded it the last time they viewed the page. Page editors can also set collapsible content to be open by default on an individual collapsible container basis.
Add collapsible content
- Go into edit mode and place the cursor where you want to add collapsible content in the Rich Text Editor.
- Click the Add collapsible container icon in the Rich Text Editor toolbar.
- In the Collapsible container that appears, click in the Enter summary text... field and type a title or summary for the collapsible content.
- Click in the Enter body content... field and type the content that you want to be able to expand and collapse.
- Continue editing the page or click Save.
Have collapsible content open by default
Collapsible content will display as collapsed or closed by default, but it can be set to open by default on an individual collapsible container basis.
- In edit mode, place the cursor in the Summary text/title field of the container that you want to set to open by default.
- A menu will appear either above or below the container. Click on Open by default to select it.
- Continue editing the page or click Save.
Change background and text colors of summary/title
By default, individual collapsible content containers have no background color in the summary/title field, but there
When a second layer of collapsible content is created, the first layer automatically gets color applied to the summary/title field to differentiate the first layer from the second layer. The color for this field comes from the Colors > Button > Normal setting on the Admin panel Theme page.
To give the second layer of collapsible content the same default background color as the first layer, click in the summary/title field of the second layer, and click Show header background in the menu that appears.
The colors available in the font color and background color color pickers are default colors which can be overridden using the config setting richTextEditor.fontColors. To learn more, see Specify available fonts and font colors in RTE.
To apply the default header background and text colors to an individual collapsible content container or to a nested second layer of collapsible content:
- Click in the summary/title field of the collapsible content whose header colors you want to change.
- In the menu that opens above or below the collapsible content, click Show header background.
To change the background or text color of collapsible content to a color other than the default:
- Click in the summary/title field of the collapsible content.
- In the menu that opens above or below the collapsible content, click on the Header background color or Header text color icon.
- To select a color from the color picker that appears: click on a preset color, OR click on Color picker and enter a HEX color code, OR select a color from the color customizer and click the checkmark.
To reset the background or text color of collapsible content to the default:
- Click in the summary/title field of the collapsible content.
- In the menu that opens above or below the collapsible content, click on the Header background color or Header text color icon.
- Click Reset color in the color picker menu that opens.
Add multiple layers of collapsible content
A second layer of collapsible content containers can be nested under the layer that is initially seen on an intranet page.
- In edit mode, place the cursor in the Enter body content... field of an existing collapsible container.
- Click the Add collapsible container icon again to add another layer of collapsible content.
- A new collapsible container will appear, and the summary/title field of the first layer of collapsible content will be filled with an accent color to differentiate it from layers below it. Add summary/title and body text as described under Add collapsible content above.
- To add another collapsible content container in the second layer, place your cursor below the content you just created and click the Add collapsible container icon again. Repeat to add more collapsible content containers.
- To change the order of the content containers, hover over a container, click on the square that appears on the top left of the container, and drag and drop the container into the order you want.
- Continue editing the page or click Save.
Delete collapsible content
- In edit mode, hover over the collapsible container you want to delete, and click on the square that appears on the top left of the container to select it.
- Once the container is selected, tap Backspace or Delete on your keyboard to delete it.
- Continue editing the page or click Save.
Comments
1 comment
I just applied this feature to a longstanding acronyms and glossary page that I keep updated, by adding a drop-down for each letter of the alphabet. Wow! So much easier to scroll through the very long list of acronyms now that they're collapsable. Thanks, Thought Farmer, great addition! I'll be finding other places to use this when helping colleagues with their departmental hubs.
Please sign in to leave a comment.