I’m trying to create a series of landing pages using the CMS. I understand the basic concept of using a collection template to achieve this. What I am wondering is if there is a way to use multi-reference field to generate sub-pages for each collection page.
For example we have two collections each containing three items. The first collection is linked to the second with a multi-reference field. Is there a way to generate 9 pages, one for each of the parent collection and referenced collection?
If we have
Cities
Chicago
New York
Los Angeles
and
Services
Butcher
Baker
Candlestick Maker
Can I create 9 pages automatically with one template?
I saw examples using AirTable and WhaleSync, but it’s unclear if they actually solve this problem or just sync a flat database. I’d also rather not complicate things with a third-party service.
@memetican I’m not sure how even doing it this way manually would solve the problem. I might as well just use one collection if I’m doing that much work.
I could make a duplicate collection for each location that all contain the same services. That would at least give a nice URL structure (/location/service), but then I would still have to keep them in sync.
The main advantage to the cross-reference pattern is that you can bulk load and automate the creation of thousands of records if you need to, and each has full access to the related record fields. In most of my projects, great SEO is a primary requirement, so having individual pages for e.g. Location and Service are great.
With an xref, you can easily list the relevant services on your city page, the relevant cities on your services page, and connect everything up easily.
However your URLs would not be segmented. Instead they’d look something like- /c/chicago_baker
Depending on how you want to SEO.
I wouldn’t recommend splitting a collection the way you’re describing, you’ll likely find the admin overhead and the resulting limitations are not an acceptable trade-off.