Link collection list to static pages

Hello there,

I am building a portfolio website and created my “home” with the help of the CMS collection list to show project previews (image, description, and CTA to project page). Now, I built each project page as a static page and I have trouble now linking the preview with the actual project page. Can you actually link them or does the project page need to be a collection page too?
Thanks a lot!

I use a similar system for my blog. I have a collection of posts, and most of the posts are CMS, but some of the posts are static pages.

So, in my collection, I added a Link Field named “static page link” for when the post is a static page.

In my collection lists, on each item, I have two button: one button has the CMS link “Current item” that redirects to the CMS item page, the other is a button link attached to the “static page link” field.

The button that link to the CMS page has a conditional visibility on “static link field IS NOT set”, and the button to static page has a conditional visibility on “static link IS set”. So only one button ever appear on each item, they look identical, and redirect either to the CMS post or the static post page.

6 Likes

This was a solution for me! thanks for making me aware of it!!!

1 Like

Hi-If your static page is one of your webflow pages, how do you get the url for that?

Never mind I figured it out but thanks, so glad I found this :slight_smile:

@vincent Thanks this is super helpful and it solved my problem.
BUT:
Is there a way to specify domain wildcard in the link address naming convention in webflow, when specifying the Static Page Link address - so that when I’m done building my site and ready to connect my own domain name to the project, i dont have to go back and manually change the static page link in every collection item used this way to point to a static page ?

ie, rather than:
http://my-webflow-username.webflow.io/static-page-slug … is there a something like:
*/static-page-slug

(where “*” will fill in “http://my-webflow-username.webflow.io” when I’m still publishing from Webflow’s url domain, but fill in “http://my-domain.com” once i connect my custom domain)

Thanks

You don’t need a wildcard, just put /static-page-slug as the address… I mean depending on where you place the link. Could be …/static-page-slug if your page was already in a subfolder.

@vincent That was the first thing I tried, but Webflow blocks/disallows that at the CMS field! See screenshot attached. Error: "Should be a valid url like “http://webflow.com.”

CleanShot 2021-09-06 at 17.26.32|671x119

Hmm maybe if I make this a text field (not a Link Field) is it possible to bind it that way? I don’t think that will surface it in collection list as an option, right? How did you resolve this?

thanks