Other articles in this category
Search More Content
Open/target Specific Accordion Item with URL
For this we need to define a prefix that will be applied to the ID attribute of accordions in HTML. For example, Prefix “myaccordion” will be applied as myaccordion-1, myaccordion-2 in ID attribute of Accordion 1 and Accordion 2 respectively. It should only contain dashes, underscores, letters or numbers but no spaces. Here is how to do this:
Step 1: Open the Advanced accordions module settings and click the Style tab.
Step 2: Locate and edit the Custom ID Prefix field. In this example, we’re going to add myaccordion.
Step 3: Click Save.
Step 4: In this example, our link will be a button. Create a new Button Module and add a Link in the following format: [website address]/[page]/#[prefix]-[1,2,3,4]
The prefix is the same as of the one you set on the Advanced Accordions settings’ Custom ID Prefix and the number following the “-” refers to the Items in that Accordion. The first item is 1, second item is 2, etc.
In the case of our example, the link that corresponds to the second item in our Advanced Accordion on the FAQ page will be: https://mywebsite.com.com/faq/#myaccordion-2
Step 5: Click Save, and now anyone who clicks that Button will go directly to the FAQ page and will see the second Accordion item open.