CMS dynamic item of type URL

Hi,

A CMS table has a field of type “link”. This link field is used for “mailto:…” URLs, NOTfor URLs of type “http://…”.

When trying to bind a dynamic item element to the URL field using “Get URL from” it shows “no field available”.
As soon as at least one record in the CMS table has a “http://…” URL in the “link” field, the link field to bind to is shown in the editor.

It looks like as Webflow checks “link” fields in the CMS for at least one “http://…” URL before it makes it available for binding with an HTML element using “Get URL from”. I believe it shouldn’t.

Norbert

1 Like

I never realized what you discovered, that’s quite interesting.

I have nothing ready to test it but…

… a workaround would be to put your link in a text field in the collection. Only the e-mail address maybe. Then use a custom code widget to put the element that has the link, along with the mailto code, and then make the email part dynamic by linking it to the collection.


FYI, a bit unrelated but when you need to type a link that is not http:// in the link field of Webflow’s UI, you need to type a backtick character before the link.

Like this: `

backtick: thanks for the hint :slight_smile: I hope to remember it when I will need it.

I helped myself by creating a temporary record with “http://…” in the link field, binding the dynamic item and then removing the temporary CMS record.
However, I thought the behaviour I found may be interesting for the webflow team.

1 Like

I’m updating my Webflow secrets post quite often, you’ll find it back there :smiley: Webflow secrets — Manifest blog, #nocode web design revolution

That is great! If this behavior doesn’t change on Webflow’s side, your trick will become a Webflow Secret in my list :wink:

Quite some time ago I had found a trick to nest symbols, by adding and removing something too. It’s not possible anymore, and it may have destroyed a site of mine once ;D

“Webflow secrets”: great :slight_smile: . Bookmarked. Thanks!

1 Like

@sabanna just told me this:

“Actually, there are 2 new type of dynamic fields: “phone” and “email”.
Email field will automatically add “mailto” attribute"

Can you check?

1 Like

Checked.
Works like a charm :slight_smile:
Thanks!

2 Likes

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