CMS list specific to CMS Collection Pages

I would like to create a CMS list that is specific to the CMS collection page it’s in.

To be specific: I’m creating a job board, where each job has its own page (a Collection page). I would like to have a dynamic list of “other jobs at this company” on that page…the problem when I do that, is that this exact list (with that specific company filter) is applied to all other job pages (as the one where I originally added the list is considered a template for all others)…

Any idea whether there’s a fix for this?

Help much appreciated!


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

Hi @bkmat

Thanks for posting this great question on the Webflow Community Forum.

From your description, I believe the problem is by the way you’ve set up the filter. I also have my doubts that the problem might be harder to solve if you need to filter the list based on another Collection or an Option field instead of the current Collection item.

I’ll be able to better help you find a solution if you can please share a Read-only link of your project.

Standing by for the link to help you further,
Anna K

Thanks @AnnaKelian

Here is the link
https://preview.webflow.com/preview/mbastash2?utm_medium=preview_link&utm_source=designer&utm_content=mbastash2&preview=6baacdff05ee6c167cf623fafd140102&pageId=5e0ea334d4243bd53830c7c4&itemId=5e1231f3c5e98c9657f783b9&mode=preview

You’ll notice the collection in the div block at the bottom has a filter for a company name that’s different than the company that is mentioned on that specific page. If I were to change that filter to the current one, it would change it on all pages.

What am I missing?

As an aside, could you advise the best way for me to center that div block on the page (is there another way than just playing with the margins? that seems like an imperfect solution)

Thanks!

Hi again @bkmat

Problem
That filter is static because you’re typing in the name. Anything static in a Collection page or Collection list will be the same for all Collection items.

image

Solution
So, the solution is to use a dynamic filter. That can only work for the current Collection or references. For this Collection, you can only set Job is current job. And that’s not what you want.

Next step
You need to restructure your Collection. Create a Collection for the company, that way you don’t need to type the company name and add the company logo over and over again. Then, you can add a Reference Field to the Jobs collection and choose the company from that collection. Then, you’ll be able to set a dynamic filter using the Reference Field.


You can learn all about Reference Fields: how to set them and how to use them in filters on Webflow University:

Hope this is helpful.

You can center an element horizontally using the center element button on the Style panel.

Selecting the center element button will set the margin to auto on only the element’s sides, leaving the element’s display property unaltered.

https://p-ZmFjbkd.t2.n0.cdn.getcloudapp.com/items/KoueYkmQ/Screen+Recording+2020-01-08+at+02.47+PM.gif?v=ad19a259d0ef2cf0a08a168c69aa5e8d

Hope this is helpful.

Thank you Anna, this is very useful. If I understand correctly, the issue this restructuring creates is that I will quickly run into the limit to the number of collections that Webflow allows (i.e. this will prevent me from listing more than 20 companies), so I may need to shelve this functionality.

Thanks again for your help. I’ll make sure to reach out again if I have other questions related to this.

You’re most welcome, @bkmat

I don’t think you’ll run into any limitations of that kind by creating one more Collection for “companies.” Each company will be a separate Collection item within the new Collection. I believe you have a CMS hosting which allows you to have up to 2,000 CMS items total between all Collections.

Hope this clarifies things. If you have more questions, please don’t hesitate to ask them and I’ll be happy to help.

Thanks for clarifying, I had misunderstood your initial recommendation. I’ve just tried it and it works. Thanks and I’ll be back in touch if I need further advice on this topic!

1 Like