Linking one item to another item in different collections

Hello,

I tried very hard to find a solution, but what I found is still not working as I’d like.

Is there a way to link one item in collection A to an item in collection B without using the direct Slug?

Cloning the project or moving the website, it results in links disconnection.
Or just asking your client to copy paste a link from one collection to another one it sounds very unprofessional to me.

Thanks


Here is my public share link: LINK
(how to access public share link)

Nope. Note: You can avoid issues by using relative links.

Thanks, I didn’t think about that!

Can you show me how to structure a relative link when the website is still on stage?
I would be able to do it seeing the folder tree, but I’m not sure how in webflow.

Thanks

Sure … a relative path would be /collection-slug/collection-item-slug without the protocol and hostname.

Maybe I’m doing something wrong, but I think webflow doesn’t allow you to set a relative link in the dashboard.

1 Like

Hello guys, any idea or workaround for this issue?

Not if the field is a URL field. If it was just a text field you could; then you would need to build the link yourself with custom code.

I can change that filed in a text field if needed. It is there with the only purpose to link the 2 items together.
But then of course a link box doesn’t accept a text field in the link setting lol

(It looks like they made it on purpose to complicate everything, considering as well you cannot nest collections)

Which kind of custom code you are talking about? Do you have maybe any reference?

Check this : Relative path in collection, link field - #15 by AmineA