Direct Access To An Accordion Item - Question | JoomShaper

Direct Access To An Accordion Item

A

AJCS

SP Page Builder 3 weeks ago

Hello

Can we access an item by URL if we use the accordion component of SP Page Builder?

We would like to have a link, and that shows the selected ITEM open.

thank you

0
5 Answers
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 3 weeks ago #154041

Indeed, it's this kind of customization is beyond JoomShaper support. And I also suggest contacting a developer (freelancer) in your city, it may take him an hour if he/she is good.

You can create that as new addon or override in template folder ( https://www.joomshaper.com/documentation/sp-page-builder/how-to-override-sp-builder-addons )

0
Pavel
Pavel
Accepted Answer
3 weeks ago #153993

Hi.

By default, this is not possible with an accordion, not only in SPPB but in general.

You can write your JavaScript for this.

Approximately, the logic of the script is this:

(If the link is on another page)

If the URL contains your value, scroll the page to your element, open your accordion tab.

(If the link is on the same page)

Use anchor link to your element. And through the onclick JS event, delete all the active classes from the accordion and add the active class to your accordion tab.

0
A
AJCS
Accepted Answer
3 weeks ago #153994

Hello

I don't quite understand how JS onclick works. Can you send me a DEMO. I attach a link to the hidden page. We are interested in linking by URL to some of the ITEMS, and having it open automatically. thank you

0
Scott
Scott
Accepted Answer
3 weeks ago #153998

Please clarify

A. Are you looking to link text or button from inside an accordion tab?

or

B. Link Text or button from another article page to a specific Accordion tab?

0
Pavel
Pavel
Accepted Answer
3 weeks ago #154040

Hi AJCS .

I attach a link to the hidden page.

I am not an employee of support. And as far as I know such things outside the support.

If you do not have the skills of JS coding, just hire someone for this work.

0