How to use Plasmic CMS to filter catalog by category?

Hello everyone Please tell me if I use plastic cms and want to filter the catalog by category, what should my process look like? Create all products in one collection and make a field for a category or should I create a separate collection for categories? and then how to implement it technically?

I believe either approach should work. I think your preference may depends on how often this organization changes.

For approach 1, I’d have a field for category. Then you can specify a filter in your CMS Data Loader component.

For approach 2, you’d just create a separate collection.

I suppose 1 consideration right now is that it’s not that easy to move data between models. So if the schema looks the same, I might put it in 1

Well, thanks! And how do I display links to these categories in the plastic interface itself, for example: all products, category 1, category 2… and so that when you click on them, the content changes referring to the category?

Im not sure how you want to organize it, but you can for example create different pages for each and then just link to them?

And how is it done correctly in the traditional way? without duplicating pages?

Is this what you mean? to have a dynamic route for different categories?

Yes, I probably meant that, but is it probably true for pages, or am I wrong? in fact, I want the list of products to be updated and not everything that is on the current page…

oh I see… i think if you want to make it dynamic within the code component, you might need to modify the code component. For example, you might have the fetcher component read which category from a React context. Then you might have a separate selector code component that sets the category in the React context.