Streaming live at 10am (PST)

How to link to a section within a CMS item (blog posts)


#1

Hello,

We publish long-form content/guides etc, so we’re trying to create content menus that navigate to the relevant header/section of a post.

Essentially our final goal is to create something like this: https://skedsocial.com/visual-marketing-platform/ (see the list of topic items and how you click them, it jumps down to the relevant sections?)

Thanks


Here is my public share link: LINK
(how to access public share link)


#2

As far as I see it, there’s a way, but it would impact the structure of your CMS too much, and induce limitations in how you freely create a new post, forcing you to respect a certain structure and volume.

Unless someone comes with a better adive, I recommend you have that feature developped by a developer, using Javascript. The script would parse the post, locate where the H2 and H3, add IDs to the appropriate elements, then populate a box at the top of the page, that you would have designed, with the list of links gathered from the page. This way you’re keeping your CMS simple and all your options to write your post inside of a unique and lengthy RT element.

Such a JS shouldn’t be too complex nor too expensive.


#3

You might want to take a look at a step by step tutorial created to demonstrate how to create a table of contents dynamically within a cms item.


#4

Hey, just an update…

However, as you can see, when you click the links in the table of contents it prefixes ‘toc’ to both the links and creates a tag rather than having the IDs attached to the header elements.

I’ve tried removing the prefix line from the javascript, but it didn’t have any effect.

Where as it seems Webflow themselves are able to make this work in their University CMS without the prefix - so the hashed URLs look cleaner, and IDs are attached to the actual H2s.

Any help anyone?