CMS & Logic4 min read
Add link anchors to your CMS collections in Webflow

Introduction
| Element | Custom attribute / ID | Value |
|---|---|---|
| Embed link (source) | href | #{Slug} from the CMS field |
| Embed target (destination) | id | {Slug} from the same CMS field |
In this tutorial, Sandro, cofounder of the Gemeos Webflow agency, shows you how to add anchor links with your CMS collections in Webflow.
Webflow doesn't support dynamic anchors with the CMS, but there's a workaround: use the embed component, build your own button, and dynamically pull the anchor from your collection.
Here's how to do it! ✌🏼
1. Insert an "embed" element where you want to create a link to the anchor element
Set the link using the CMS "slug" field. You can use any other CMS field for this, or even create an extra field, but the "slug" field does the job.

<a href="#{Slug}">Name</a>2. Add an "embed" element inside your CMS collection
Set the ID to the same CMS field you used in step 1 (the {slug} in my case)

<div id="{Slug}"></div>3. Test the result
You can test the result directly in the Webflow editor



