Best practice for Category Collection Type

System Information
  • Strapi Version: 4.0.6 Community
  • Operating System: Windows
  • Database: SQLite
  • Node Version: 14.18.2
  • NPM Version: 6.14.15
  • Yarn Version: 1.22.4

Looking to develop a business directory backend using Strapi. I was wondering if there were any best practices or suggestions from others on how to best set up the category hierarchy collections.

I started out with a simple category collection: Parent Cat. Cat. Name. Slug. but I can already see potential issues creating the listings and having a mix of Parent Categories and subcategories.

My use case could potentially have 50+ Parent categories with those parents having multiple subcategories and so on and potential subcategories having their own subcategories.

  • Parent 1
  • -Sub Category 1
  • -Sub Category 2
  •     -- Sub Category 3
    

Let me know if there are any questions and really appreciate any assistance.

Have the same issue? Did you find any solution for this?

I asked the same question. Hope someone can help out.

Did you manage to figure this out? I am creating a hierarchy, and use a related field to choose the parent, so thats all OK, but I am trying to work out how to create the path/slug based on the parent/child hierarchy. I wondered if your issue was similar and could help. At the moment we enter the full path as the slug, but ideally we want build the path based on combining slugs of parent/child entries. My post is here Anyway to auto create slug hierarchy based on relations? Parent/Child