Streaming live at 10am (PST)

Setting "section / anchor" ID to work on a dynamic list ... is this possible?


#1

Hi all … anyone know how to set auto-scroll positions (position anchors) when you have a long dynamic list running vertical? As you would if you set a link action to scroll using the section ID.
Is there a way of auto-scrolling the page to a specific element in a dynamic list?

Thanks!



#2

Short answer should be no, you can’t, because there is nothing unique that you can set in a collection list. Any parameter set on an item is set for all items. Only the dynamic content can be unique.

Considering the last sentence, you can eventually add a unique ID to some or all items in a list, if that ID comes from the collection data.

So, when you put a unique ID on a div in webflow, for example, you get that code:
<div id="myUniqueID"></div>

So you can have a div with a unique ID in each of your collection item.

  1. add a text field in your collection, and enter a unique ID for each of the items, or some of the items
  2. add a custom code component in an item of the collection list, preferably at the top or middle
  3. type that code in the custom code box <div id="xxx"></div>
  4. select the xxx and click on the purple link “Add field” on top right of the box, then select your text field
  1. should look like this

Now there’s a different ID for each of your items in the collection list, so you can pretty much link to an anchor wherever you want.

You could also try to use the slugas a unique ID, it’s pretty safe as the slug can’t have spaces and should work well as a unique ID.


#3

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.