I was doing the something similar but this helped. Thanks!
However, as I add more items in the FAQs, "data-target" attribute wouldn't generate a unique ID and that would lead to all accordion tabs to open at ones.
Somehow got it working with a couple of workarounds now.
You could add the ID as a field in your stream blocks model as well. Each accordion tab would have the input in the wagtail admin for the id, title, text. You would then use the wagtail template tags in the html template to bring in the ID where you need it. Hard to guide you much more without seeing your code, but I hope that helps!
I was doing the something similar but this helped. Thanks!
However, as I add more items in the FAQs, "data-target" attribute wouldn't generate a unique ID and that would lead to all accordion tabs to open at ones.
Somehow got it working with a couple of workarounds now.
You could add the ID as a field in your stream blocks model as well. Each accordion tab would have the input in the wagtail admin for the id, title, text. You would then use the wagtail template tags in the html template to bring in the ID where you need it. Hard to guide you much more without seeing your code, but I hope that helps!
Glenn, that helped. Thanks!
I'm glad I could help! DM me anytime and I'll be happy to give you a hand with Wagtail.
I'm also on Code Mentor if you ever need some "live" help. I've been able to help a few folks fix their Wagtail issues. Cheers!
Cheers Glen. I just might take you up on the offer. Planning a product on Wagtail CMS.