Hello colleagues,
Recently, I have decided to develop my own CMS platform because I have already written a lot of code to my clients and I said "Why don't get all this code into one project?" and that's it. OK first I understand the reasons that you will say "Why you choose to create your own CMS and don't use something like NopCommerce or something" the answers in this question is because I like to make something custom in order to support it more easily and to learn some more to develop.
To begin with my problem, I want dynamic routes! I have already implement the below code to my project.
However, the problem here is if I have more than parameters what can I do? But it is not fixed length. For instance, lets imagine we have the below menu:
- Home
- Categories
- About
- Contact
The Urls will be
- /home
- /categories
- /categories/cars
- /categories/cars/audi
- /categories/cars/toyota
- /categories/cars/volvo
- /categories/bikes
- /categories/bikes/yamaha
- /categories/bikes/honda
- /categories/bikes/kawasaki
- /about
- /contact
In above list every single page have a description which I get it from DB that's why I want to get or all query string and I will search it in DB or something else that I don't know. For example cars it is a page but in case of audi , audi will be page. It is simple if I know, I will have only three depth of menu but I don't want this because the depth of menu will be almost infinity if my client needs.
Hope you all understand what exactly I want. I look forward for your suggestions!!!