Hello, everyone. I am building a site for an architect. I’ve made 4 cms collections, 1 for each category of building (residential, commercial, etc.). This will enable me to organize the galleries easily, but it poses one problem.
I want to have a small cms grid on the homepage that shows the most current projects the architect has completed, and I want this cms grid to pull from all 4 collections.
Is that possible, or am I better off combining all of the projects into one collection and then somehow make each gallery (residential, commercial, etc.) pull only the projects with that category field, and so on?
I’m still learning how to use the cms, so I apologize for the noob question. And thank you so much for your help.
There is no link b/c it’s literally just the hero section at this point.
When data is shaped similarly, it should probably be in the same collection.
A better approach is;
Projects - contains all projects
Category - lists your 4 categories
The Project then has a single-ref to the category.
This lets you have category pages listing all projects, a mix of recent projects or featured projects across categories. It also lets you properly re-use your collection page for DRYer ( don’t-repeat-yourself ) design.
Michael - that’s what I’m thinking, but I didn’t want to undo all the cms importing work I’ve done without knowing it was really the best move. I’m still gathering info.
Marcin - I have not. I’ve seen their nesting multiple collections solution but that’s not what I’m going for. I’ll check out this one b/c it sounds more relevant.
Hey, Marcin. I tried using the solution you gave me, but it does not seem to work. Would you be willing to take a quick look at it to see if you can figure out what I’m doing wrong? I pasted the code where they said and added the attributes where they said.
I appreciate it very much. It’s near the top of the homepage (2-3 sections down). Ignore everything else on the page b/c I am still building it out.
@Cdlarsen73 what was the outcome here and how did you get it to work? I also want to create the same feature but for case studies and blog posts. Let me know! Cheers