Streaming live at 10am (PST)

Dynamic IDs in dynamic list items for inpage anchoring


Hello, I would like to assign IDs to dynamic list items in order to use them as anchors.
I found another thread about this but I don’t understand how to do this.

Here is the preview of my project.

Go the the page “referenzen” to see the example.
At the beginning of a page there are some links. The titles of the links come from a dynamic list. Scrolling down you can see some full screen sections. Those also come from the same dynamic list.
I would like to anchor the links at the beginning of the page to full screen sections.

Any help would be highly appreciated!


Table of Contents?
var Webflow = Webflow || [];
Webflow.push(function() {
  // Set dynamic list IDs based on h1 tag content
  $('.full-screen-block').each(function(i) { 
    $(this).attr('id', $(this).find('h1').first().text().toLowerCase().replace(/[^a-z]+/g, '-'));

Also, feel free to contact me for further code help and/or customization of third-party plugins


Hi Samliew, thank you for this code. Sorry for the ignorance, but how should I use it?


Paste in Page Settings > Footer Code. Publish site.


Hi Samliew, thank you for your help.
I did that already actually, but I don’t see it working.

I tried to give the h1 elements inside the dynamic list an ID and then anchoring them to the links above the fold but without success. I tried in different ways but nada.

The confusion comes from the fact that the custom code becomes active only after publishing the website. So I can’t see the option of anchoring the links in the Designer.

Could you explain me a little bit how this code should work?



Custom code only works in the published site…

Your IDs are there…


OMG, I had it working!
I added a field in the collection called “anchor link” and I populated it with the in-page links such as “

then I connected the links to this field.

Thanks so much Samliew!


Can someone explain what the code actually does so I can understand how this works. It sets the ID for each H1 heading to match the name?