I hope this isn’t too much of a basic question, but I’m moving from WP to Webflow and trying to figure it out.
What I am looking to do is add a new blog post (a review of X product), which seems easy enough. But I would also like to add a “Summary” as a CMS item of that product and then have Webflow create pages of X vs Y products using those summaries automatically.
So, basically if I had 10 reviews in a certain category and then added one more, it would go ahead and create all the X vs Y, X vs Z, Y vs Z pages automatically. Obviously with something like 50 products in a category this would be a lot of pages so thats why I’m hoping it can do it without manual interaction.
An X v Y comparison page is possible, but rather hacky.
Let’s say your Products collection page is at /products/..
Build that out put all your product info there etc.
ALSO build a smaller “comparison” chunk that will appear in the X v Y comparison view.
Let’s wrap that in an DIV, with an ID of compare.
Create a page called Compare at /compare
It’s going to handle requests for the form; /compare?x=product1&y=product2
You can name x and y whatever you want. The values are the slugs of the products you’re comparing.
This page will be setup with your general nav, your layout, and two big DIVs for where you want the comparison chunks to appear. Let’s ID those DIVs product1 and product2.
A script will parse the URL, get those product slugs, and the retrieve the comparison chunk using an AJAX-style jquery load call, like;
const x = the querystring value for x;
const y = the querystring value for y;
$("#product1").load(`/products/${x} #compare`);
$("#product2").load(`/products/${y} #compare`);
Now you have a working comparison page.
If you want, you can add wildcard redirects to clean up your URLs, e.g. /compare/(.*)/(.*) → /compare?x=%1&y=%2
Note for SEO, those pages won’t be generated in the sitemap.xml.
Your bet is to build a page with script, that enumerates and creates all those links, really just for Google. I might put that at e.g. /find and not even include it in my site nav.
That page will appear in the sitemap.xml, so Google will see it there, index, and catalog those links.
Ok, thanks for your response. Will this create comparison pages for all of the different products in a specific category? So 1 vs 2, 1 vs 3, 2 vs 3…etc?