DEV Community

loading...

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

Collapse
paqman85 profile image
Glenn Paquette Author • Edited

I find wagtail has a great community around it. They have a very active slack group that's open to everyone and is very helpful.

But your right, it can be difficult to navigate at first since the docs do not advocate for any perticular guide to build a website. It's versatile, and up to the developer to decide how to implement the tools they provided.

I would use stream blocks to create a accordion template and use the wagtail backend to dynamically populate it. As you add new elements from the CMS side, it would extend the accordion another level. Hit me up with a DM if you want some help. :)

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 Author

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 Author

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.