The “Expand/Collapse All Widget” (expand_all) module allows you to configure and add a button to a panel that visitors can click on to expand or collapse all the accordions targeted on a page. An example of this module can be found on the page "Designated site contacts" of this website.
For the purpose of this tutorial:
Your user role needs to be that of a webmaster or higher.
You need to be able to add the widget to a Panel page or a Mini panel. If these are not available on your site, please ask your webmaster to enable the “Expand/Collapse All Widget” (expand_all) module, or request that a member of the Support team enable them for you using the Service Desk request form.
For this tutorial, we will be adding the widget to a Panel page. But the steps are the same for Mini panels.
Navigate to Structure and then Pages.
Find the page on which you wish to add the widget and click on "Edit".
In the left menu, click on "Content". You should now see a layout of your page.
In the top-left corner of one of the regions, click on the gear icon. A dropdown menu will appear. Select "Add content".
In the pop-up window, select "uOttawa Widgets" and then "Expand/Collapse All".
You will now be given a few options (see image below).
"Expand All" text: This setting allows you to change the text that appears on the button.
"Collapse All" text: This setting allows you to change the text that appears on the button.
Define the expand/collapse group by: This setting allows you to specify whether you want the widget to affect all accordions on the page, or only a select few (defined by either a CSS ID or a CSS class).
Initial button state: Define whether the button's initial state should read "Expand All" or "Collapse All". You should generally leave it to the default setting (Expand All).
Once you're done, click on "Finish" to add the widget.
Finally, click on "Update and save" to save all your changes on the page.