Hi Bob,
As Jeff says, Webflow is not ideally-suited for this, however there are some workarounds if your layout variations aren’t overly proflific or complex.
Here’s the approach I use-
I think you’re saying that an article about cars might show a list of car-shaped items, while a list of boats might show a different set of boat-shaped items. If you have thousands of different item-shapes, yeah, you’re going to struggle to make Webflow do this.
The best I could suggest is to manage and pull that data AJAX-style from a headless CMS as JSON, and then combine it with a local repository of “templates” to create your data. But you’d essentially be building a lightweight system on top of Webflow to accomplish that.
Here’s some thinking that might help you if you decide to pursue this.
If it feels out-of-depth, I woudn’t tackle it because this is just the surface layer. The details will matter here.
However if I had to do this, I’d structure the CMS something like this;
Blog
which contains your posts
Blog Products
contains the list of products attached to your blog
- single Ref to Blog
- single Ref to Product
- integer sequence if you need to explicitly control ordering
Products
which contains your product items, e.g. each car, boat, etc.
- single Ref to Product Type
- URL probably to the actual product data, stored as JSON somewhere that it can be effectively managed
Product Types
which defines the shape of each type, e.g. car, boat, fruit, etc.
The Product Types collection page would define the repeating template so you can create it in the designer. use custom attributes to map your JSON fields.
Blog Products
is separate because multi-ref fields are difficult to work with, especially as the number of items you can reference grows. Thousands would be difficult. However you also probably want Products to be shareable across articles, without duplicating them. So we create Blog Products
as an xref pattern, to connect Blogs and Products and let you control the ordering individually for each blog.
However, blog products is “expensive” in terms of the number of collection items you’ll be creating, so… trade-offs for that flexibility.
The scripts to construct your view aren’t bad- pull the data, pull the template, and merge them. But the data administration is going to be ugly, just no way around that. Depending on what headless CMS you find, and its capabilities, you might be able to simplify some of that work.