I’m trying to organize my handlers/events into 3 levels, so that they can be accessed by the following SES urls:
How should I go about doing this?
I know if it’s just 2 levels I can simply create a “product1.cfc” under handlers folder, and create a “reports” function. But I can’t go further and create a “sub-event” for “report1”.
I’ve tried to make “product1” a sub-folder under handlers, with “reports.cfc” in the folder and “report1” a function in the cfc. But then there’s no way for me to access [baseurl]/product1.
Hope this make sense
Packages (subfolders basically) are the first answer to this, but you’re also wanting to hit product1 directly. In this case you just need to create routes for the SES routing you want.
This will allow you to create every conceivable URL pattern you want and map it to any handler/action.
I can’t figure this out…
Again, all three of the following urls need to be accessible:
I have in the handlers folder the following content:
and in the router.cfc I have:
But I’m getting all three urls now going to product1\index.cfc. How do I tell the router to only route “[baseurl]/product1” to index.cfc?