Streaming live at 10am (PST)

Do CMS Links automatically update when you change domains?


#1

I have a question concerning links. I’ve tried tech support but I don’t think they understand my question.

I have created a CMS collection named “Products”.

Under this collection each product has four link fields named related link #1, related link #2, related link #3, and related link #4. I manually entered these links using an absolute URL. For example, the first product is “Algae Omega” and under this product the first link under the “Related Link #1” field is http://omega-direct.webflow.io/products/vitamin-d3-vegan.

What do I need to do to get these specific “link fields” in CMS to automatically update? I assume they won’t update on their own. I tried to enter relative links such as /products/vitamin-d3-vegan but the link fields won’t work this way.

I don’t want to have to manually update hundreds of links when I change my domain.

My read only link is below as well as an example image. To follow this specific example open the “Products” CMS collection and click on any product. If you scroll to the bottom you will see the link fields in question (related link #1, #2, etc.)

I’d REALLY appreciate some help with this!


https://preview.webflow.com/preview/omega-direct?preview=2bc1fef112a830aa85b295af6ea7fe00


#2

Those won’t change as it’s a text field, and not a reference field to another item.


#3

Technically they are “link fields” however I think you are correct. Surely there is a way to have relative links in link fields? Otherwise I have to update over 1000 links by HAND!


#4

IIRC link fields do not support relative links - they have some extra validation on top of text fields.

However, you cannot set a text field binding to a link element URL.

If possible I suggest changing to a reference field instead.

As a last resort, you can always use custom code to replace the links to the new domain.


#5

Hi @Bghead8che, if you are using hard coded links in the url field, you will need to change those manually.

Rather I would suggest to use the Embed widget with collection fields (https://university.webflow.com/article/how-to-use-dynamic-embeds-on-your-webflow-site).

Using an embed will allow you to create fields in the CMS to save the path to the page you want to link to in a text field in the cms collection, i.e. for a value like “/products/vitamin-d3-vegan”.

What you could then do is to create your links in html in the embed widget manually and insert the relative path from the cms into your link.

I hope this helps.

Let me know if any questions.