Is there a way to link to a wiki page containing an accordian and have the page load with a particular accordian item already open, similar to loading a page scrolled to a particular point on the page?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Hi, my friend! Apologies for the delay - I'll ask the team! ☺ @Bobloblah
Obsidian Portal Support Druid | [email protected]
Hi @Bobloblah! Just wanted to let you know that this is on the Feature Requests list!
Hi @Bobloblah!
I have a response from the devs on this one:
Okay, the feature has been deployed.
Here’s how it works:
Go to your page with the accordion on it.
Right-click on the title for the section you want to auto-expand, and select “Inspect”.
This will show the HTML of the h3 element. In that h3 will be a “data-accordion-key”. This is generated from the text of the title, but formatted to be url friendly.
Copy that value.
Add “?open-accordion=” to the end of the url in the browser, and then to the end of that add that copied value.
Hit enter to go to that url.
The page should reload and auto-expand that section of the accordion.
If you have multiple accordions on the page, then you can add multiple data-accordion-keys by separating them by commas in the url (no spaces).
Note that an accordion can only have one panel expanded at a time, so it won’t expand multiple in the same accordion. And also note that if multiple accordions on the same page have the same Title text for a section, then both accordions will have those sections expanded.
Here’s an example url:
https://godsoftheforbiddennorth.obsidianportal.com/wikis/create-your-character?open-accordion=roll-attributes
(Assuming you add an Accordion to that page and one of the section titles is “Roll Attributes”.)