How to add different URL's to the same button on a CMS Template

Hi, so I have been going through many lessons in Webflow University to solve my issue and could use assistance.

Basically, I have many button elements in my CMS collection template. I need to change a button’s URL in each CMS Item without affecting the URL in other items. All this is done on the same buttons in the CMS template.


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

Hey @Sol_Paradise! Welcome to the forum :wave:

This could vary based on your setup (so please share a read-only link if possible) but basically you’ll want to connect your button (or link block or text link) to your link field in the collection:

image

If you’ve got a bunch of buttons that can be added to a collection item but you’re only wanting to show the ones that are included for that particular item, you’ll want to use Conditional Visibility:

Hoping that points you in the right direction but feel free to reach out if you run into any issues :+1:

Im not sure how to do the read-only link on mac. I’ve also attached screenshots to give a visual.
So I’ve already looked at the conditional visibility lesson before. It did help me figure out how to hide and show elements based on my cms item.

For my current issue. The button elements do not change in a cms template when you switch between items. But for each item, I need to add a new direct URL to the same button in the template.

Screen Shot 2023-03-10 at 10.12.41 PM

Hi Sol,

The instructions for read-only links is right at the bottom of your first post.

What you’re showing in your screenshot is a static link. If you’re trying to give e.g. your Kayak button a different static link, you just select it and set it’s link in your link settings.

1 Like

I’m not sure I’m understanding your desired outcome, so hopefully @memetican’s reply points you in the right direction.

Taking a peek at the read-only link should help clarify things a bit as well so feel free to include that if you’re still needing assistance.

1 Like

Unfortunaely, the project containts sensitive information so I cannot share a read only link, but I will do my best to clarify.

The goal here is inside of a CMS Collection. I need my button elements (which remain contstant in the template) to allow for new URL’s everytime I change the Collection Page to another post.

For example, I’ll use 2 collection pages. The CMS Template itself has 6 button elemets, each with their own text.

Collectino page 1: All 6 buttons have seperate url links and I want them to remain unchanged.

Collection Page 2: Has the same 6 buttons as collection page one. Now becuase this page has different topic I will be changing the url links on each button (Now heres the problem). When I change a url on the same button in collection page 2, I want it to not change the url on the same button for collection page 1. But the url will change everywhere no matter what.

Yeah I really can’t help without seeing it. You’ll figure it out, dig into the Webflow-U courses CMS and on Collection Lists.

I think you understand the basics which is that a Collection Page is a template. Everything is identical on every one of them EXCEPT for elements that are bound to CMS data. Those will show bound content from the currently viewed collection item.

So whatever it is you’re trying to do with your buttons, those are your options. Your text and links are either the same on every page, or they are bound to each collection item and show item-specific content.

Pretty straightforward.
Good luck!

I figured that was the case sadly. I have one more question then. So Im using many links per one collection page. So if I take the route of binding the buttons with link fields from the cms. Is there a method were I can have many links from one field or do i need to make a link field per link? For example one page could have 20 links. Which would exceed the 30 fields limit.

No, there is no “link list” feature. You’d need one field per link in order to bind it, or else build something special using custom code to extract and apply that link data.

Depends entirely on what you’re building but you might create a separate table for the links and then ref them back to your parent item. Then you can pull up to 100 links in using a collection list- however getting them to appear where and how you want may be challenging.

Business plan has a 60 field limit.

1 Like
  1. Hmm, that gives me things to think about. So I could be using anywhere from 15 - 60 links per CMS Collection page.

  2. So, I came up with an idea yesterday that sounds like what your saying. I made a new Collection and called it links. Then I created an item in the “Links Collection” where I made a few link fields and pasted URLs inside of the fields. Next I added a reference field to the “Blog Post Collection” in order to reference the “Link Collection”.

  3. I was able to connect the referenced “Links Collection Item” to a button on the “Blog Post Collection Template”. Everything seemed great. So when I got into preview mode and clicked on that button it did not load the link. In other words, the button does not work with the referenced link field. Is there a way to troubleshoot this?