Linking to Anchor in Closed Accordion?

I have an accordion which contains a number of DevPack components (all the same) which create tables of markdown content. Some of these markdown table cells have anchors.

If the accordion is closed, and I click a link in another component on the same page that goes to an anchored table cell in the closed accordion, it doesn’t go to the linked item.

How do I get the accordion to automatically open and the linked item to be displayed when clicking this link? The linking works fine if the accordion is open.

I have asked ChatGPT the question and therefore potentially have a way to do it using javascript but thought I would check first before going down that route.

There is no built-in way to programatically open an Accordion — you could add some custom code to do this, but you obviously run the risk of the Accordion component changing and possibly breaking you custom implementation.

Hope that helps :slight_smile:

1 Like