Hi,
thanks for both answers.
@Ved: what i want is a route containing a wildcard, let's say @item, will pass the value of this wildcard in PARAMS. This route will handle let's 20 different procedures, all based on what's coming in on PARAMS.item. However i have a two exceptions where the route pattern is 100% alike but i want to capture these exceptions. To do this i add two extra routes where @items is not in the route as wildcard but a static value. The route itself works but the app does not get PARAMS.item since the wildcard does not exist. I would like to manually add this from the route instruction so the two exceptions also have PARAMS.item, but then filled with the static value i assign. I don't know how better to explain it.
The routing table would be something like this (simplified);
Wildcard route: app/@item > Controller->show
/app/show/orders
/app/show/bikes
/app/show/cars
/app/show/cabinets
These URLS are all managed by the route. PARAMS.item will contain orders/bikes/cars/cabinets
I have two exceptions;
/app/show/advancedproducts: has to go to Controller->showAdvanced
/app/show/advancedmaterials: has to go to Controller->
showAdvanced
At this point i don't have PARAMS.item available so showAdvanced() does not 'know' if it needs to show advancedproducts or advancedmaterials.
To explain even further, the routing is auto-generated so the four first routes can be 10, 20 or a 100. Depending on which data the app will revolve the app will serve such routes for about all models.
Op zaterdag 5 oktober 2024 om 14:24:30 UTC+2 schreef v.: