Symfony2 Routing for Doctrine2 Tree Menu

At the moment I have symfony2. I installed and configured the StofDoctrineExtensionsBundle so that I can store the categories for my "store" in a nested set structure. This works great, I can output the nested tree just fine.

What I'm currently trying to figure out is how to create dynamic dynamics for each category in Symfony?

Since categories can be added dynamically, explicitly manually adding routes will not work.

The tree structure looks like this:

root: - Category - Subcategory - Subcategory - Category - Subcategory - Sub Cat

So I would like my routes to be like this: http :: / and it can continue nest further.

So my question is, from creating a nested structure and successfully injecting it, how do I know the routing is taking my tree structure?



source to share

1 answer

You can see how Symfony CMF or Sylius solved this problem.

Symfony CMF has created a router component with a dynamic router class.



All Articles