I have the following two Doctrine (ORM) entities:
- Product
- Category
Category contains one or more segment (level):
category
category/sub-category
Product contains a name and possibly a color. A Product either has a color or not.
product
product/red
I'd like to have both Category pages and Product pages.
The Category URL should be made up as {locale}/{category_path}
, e.g.
/en_US/category
/en_US/category/sub-category
The Product URL should be made up as {locale}/{category_path}/{product_path}
, e.g.
/en_US/category/product
/en_US/category/product/red
/en_US/category/sub-category/product
/en_US/category/sub-category/product/red
The problem with using Symfony's routing is that there maybe matching confusion between the following routes since they have the same number of segments:
/en_US/category/sub-category
/en_US/category/product
Is this something I can use the CMF DynamicRouter for? If so, at a high level, what pieces do I need to build? Do I need to use a RouteProvider for each Entity?