DEV Community

Discussion on: Wagtail For Fun and Profit #1: The Story So Far

Collapse
 
sndev87 profile image
Surya Narayan Dev

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.

Thread Thread
 
paqman85 profile image
Glenn Paquette

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!

Thread Thread
 
sndev87 profile image
Surya Narayan Dev

Glenn, that helped. Thanks!

Thread Thread
 
paqman85 profile image
Glenn Paquette

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!

Contact me on Codementor

Thread Thread
 
sndev87 profile image
Surya Narayan Dev

Cheers Glen. I just might take you up on the offer. Planning a product on Wagtail CMS.