Hi there,
I’ve been playing around with this and realised that I need to add the -highlander rel attribute and it would work.
Discovered another issue though when trying to open a nested element with an anchor link with the expandanchor class.
The below shortcode works as expected as long as I navigate through the accordion, however when I click on one of the anchor links at the bottom it only opens the parent element. I would need to click on it a second time to open the targeted nested element.
[expand title=”A” id=”q1″ rel=”top-highlander” trigclass=”must-be-one” expanded=”true”]
[expandsub1 title=”Nested Level a1″ id=”a1″ rel=”a-highlander” trigclass=”must-be-one” findme=”200″]answer a1[/expandsub1]
[expandsub1 title=”Nested Level a2″ id=”a2″ rel=”a-highlander” trigclass=”must-be-one” findme=”200″]answer a2 [/expandsub1]
[/expand]
[expand title=”B” id=”q2″ rel=”top-highlander” trigclass=”must-be-one”]
[expandsub1 title=”Nested Level b1″ id=”b1″ rel=”b-highlander” trigclass=”must-be-one” findme=”200″]answer b1[/expandsub1]
[expandsub1 title=”Nested Level b2″ id=”b2″ rel=”b-highlander” trigclass=”must-be-one” findme=”200″]answer b2[/expandsub1]
[/expand]
[expand title=”C” id=”q3″ rel=”top-highlander” trigclass=”must-be-one”]
[expandsub1 title=”Nested Level c1″ id=”c1″ rel=”c-highlander” trigclass=”must-be-one” findme=”200″]answer c1[/expandsub1]
[expandsub1 title=”Nested Level c2″ id=”c2″ rel=”c-highlander” trigclass=”must-be-one” findme=”200″]answer c2[/expandsub1]
[/expand]
<p></p>
<p></p>
answer a1
answer a2
answer b1
answer b2
answer c1
answer c2
If this small glitch would be fixed it would be extremely useful. E.g. one could display a lot of information within one page in an A-Z tabbed format and then any nested element could be displayed in an expanded state by click on on an anchor link from a different area on the page where the items are listed by category etc.
Look forward to your reply.
cheers,
Isti
Plugin Author
Baden
(@baden03)
You are right, there is something wonkey about nested highlander grouping with external triggers. We’ll look into it.
We do have a few solutions for external triggers, however they are all more work-arounds. We have built this feature nativly into collapse-pro-matic as it’s a more advance use.
We’ll get back to you when we have something for you to test
Plugin Author
Baden
(@baden03)
Hello Isti,
Good news! We found the issue and have fixed in in version 1.7.4a available on GitHub.
We have also put togher a demo that shows the working version in action:
http://spacedonkey.de/2703/collapse-o-matic-external-trigger-for-nested-element/
Please let us know if this fixes the issue on your end, or if you are still having issues.
Hi Baden,
Thank you so much for looking into this, very useful. As I mentioned before, this is an excellent solution when creating A to Z tabs (using the top levels) and then able to anchor link to a particular tab and display any item in the expanded state.
Awesome plugin, good support.
Cheers,
Isti
Plugin Author
Baden
(@baden03)
Happy to help! We’ll mark the issue as resolved. If you are happy with the plugin or it’s support, consider leaving a review!
Plugin Author
Baden
(@baden03)
Ah, we see you already did leave a review! Thank you so much.
Hi Baden,
Sorry to be a pain, I must be doing something wrong because I’ve tried this new code on 2 different WordPress sites and can’t get it working like you have on
http://spacedonkey.de/2703/collapse-o-matic-external-trigger-for-nested-element/
I have installed version 1.7.4a in both instances and copied and pasted the exact code you have on the spacedonkey demo page but all I have is the top level accordions (Level 1 and Level2) and when they are expanded the nested shortcode appears
i.e:
[expandsub1 title=”Nested Level b1″ id=”b1″ rel=”b-highlander”]answer b1[/expandsub1] [expandsub1 title=”Nested Level b2″ id=”b2″ rel=”b-highlander”]answer b2[/expandsub1]
What am I missing?
Cheers,
Isti