Dynamic Table of Contents Assistance

Hello

I’ve managed to follow these steps to get a functioning dynamic table of contents working: How to create Dynamic Table of content for CMS blog posts? - #11 by Siton_Systems

However I’ve run in to two issues that I’m hoping someone might be able to help with me

  1. I can’t style it, I’ve tried every kind of class related to “.toc” and nothing seems to have an impact. I think I’ve tried everything and can’t work out what I need to add to change the appearance

  2. I use dynamic conditions to hide certain headers if they aren’t populated in the back-end. However the toc still shows a bullet point but it’s just blank instead (this might be solveable by CSS)

Example page is here: https://stada-health.webflow.io/accreditation-steps/test

Thanks!
Stuart

1 Like

Hello @stuartleech

Not sure if you did, but maybe you can give this a try > How to Create Dynamic Table of Contents on Webflow CMS

I am using this one for a big site with a lot of long articles and it works flawlessly.

Try it and let me know :webflow_heart:

Hi @PeterDimitrov

Thanks for this, I did look at this before but couldn’t get it to work.

But I’ve just set it up on a blank test project and have it working so I will have to have a play and try and get it working on my actual project.

Thanks
Stuart

Back again, I’ve got this working which is great.

However I’m having the same issue in regards to headings that are hidden by conditional visibility are adding gaps to the table of contents. I’m guessing I can add an if statement to the code but I’m not 100% sure on what that should be?

Hello @stuartleech

Thanks for trying! I will check and get back to you.

:webflow_heart:

1 Like

Hi @PeterDimitrov

Did you have any luck with this?

Stuart

1 Like

Hello @stuartleech

Can you share your website link again? The one at the top of this topic isn’t working.

:webflow_heart: