2 TOC attributes from the same content

Hello,
I’m coming to you because I have a problem.
I’m using the TOC in 2 places on the same page (1 on Desktop, the other on Tablet → mob).
These 2 TOCs have the “fs-toc-element=link” attribute but work fine on the “fs-toc-element= content”. The problem is that the attribute only takes into account the first one placed on the page (which is on the tablet → mob version). This makes the attribute non-functional on Desktop.
The workaround I’ve found is to add “fs-toc-element=link-1” and “fs-toc-element=link-2” but this forces me to duplicate the content (blog post) and hide/show according to versions, which is really not a good practice!

Here is a link : Webflow - TOC Attributes test

Do you have a solution for this?

Thanks :grinning:

Hey @Fabien_mnt! I believe this might be one of the best approaches for this use case unless you might want to further style your components so they change positions on different breakpoints and only have one TOC instance.

I say this because I noticed the tablet TOC dropdown is a div with some interaction trigger to show and hide the actual table.

1 Like