Cody Posted January 3, 2014 Report Posted January 3, 2014 Some users have requested shorter URIs for order landing pages. Here are a couple routes you can add to the bottom of your /config/routes.php file to take advantage of shorter URIs: Router::route("^order/configure/(.+)", "/order/main/configure/$1"); Router::route("^order/id/(.+)", "/order/main/index/$1"); Using the above routes you can link users to: /order/id/ORDER_FORM_LABEL/ /order/configure/ORDER_FORM_LABEL/?group_id=1&pricing_id=1 Replace the bold items with the correct values for your setup. ATS Larry, Michael, ariq01 and 2 others 5
MemoryX2 Posted January 3, 2014 Report Posted January 3, 2014 I can remove the /configure/ and /id/ to just have /order/ORDER_Form_Label/ correct? That will not cause hangups will it?
Cody Posted January 3, 2014 Author Report Posted January 3, 2014 I can remove the /configure/ and /id/ to just have /order/ORDER_Form_Label/ correct? That will not cause hangups will it? If you did that you could only use the second route. You'd have to delete the first. Regardless, I would advise against it since it could cause conflicts with the default order plugin routes.
MemoryX2 Posted January 4, 2014 Report Posted January 4, 2014 If you did that you could only use the second route. You'd have to delete the first. Regardless, I would advise against it since it could cause conflicts with the default order plugin routes. Okay I won't do that then. Thank you!
Michael Posted June 25, 2015 Report Posted June 25, 2015 Guys if you add routes for the Support Manager how do you make Blesta use them instead of the default ones? Do you need to edit this: array( 'action' => "nav_primary_client", 'uri' => "plugin/support_manager/client_main/", 'name' => Language::_("SupportManagerPlugin.nav_primary_client.main", true), 'options' => array( 'sub' => array( array( 'uri' => "plugin/support_manager/client_tickets/", 'name' => Language::_("SupportManagerPlugin.nav_primary_client.tickets", true) ), array( 'uri' => "plugin/support_manager/knowledgebase/", 'name' => Language::_("SupportManagerPlugin.nav_primary_client.knowledgebase", true) ) ) ) ), Routes I managed to get working but Blesta doesn't link them on the menus etc... Router::route("^support/tickets/(.+)", "/support_manager/client_tickets/$1"); Router::route("^support/tickets/add/(.+)", "/support_manager/client_tickets/add/$1"); Router::route("^support/knowledgebase/(.+)", "/support_manager/knowledgebase/$1"); Router::route("^support/tickets/reply/(.+)", "/support_manager/client_tickets/reply/$1"); Router::route("^support/tickets/departments/(.+)", "/support_manager/client_tickets/departments/$1");
Cody Posted June 25, 2015 Author Report Posted June 25, 2015 Guys if you add routes for the Support Manager how do you make Blesta use them instead of the default ones? Do you need to edit this: array( 'action' => "nav_primary_client", 'uri' => "plugin/support_manager/client_main/", 'name' => Language::_("SupportManagerPlugin.nav_primary_client.main", true), 'options' => array( 'sub' => array( array( 'uri' => "plugin/support_manager/client_tickets/", 'name' => Language::_("SupportManagerPlugin.nav_primary_client.tickets", true) ), array( 'uri' => "plugin/support_manager/knowledgebase/", 'name' => Language::_("SupportManagerPlugin.nav_primary_client.knowledgebase", true) ) ) ) ), Routes I managed to get working but Blesta doesn't link them on the menus etc... Router::route("^support/tickets/(.+)", "/support_manager/client_tickets/$1"); Router::route("^support/tickets/add/(.+)", "/support_manager/client_tickets/add/$1"); Router::route("^support/knowledgebase/(.+)", "/support_manager/knowledgebase/$1"); Router::route("^support/tickets/reply/(.+)", "/support_manager/client_tickets/reply/$1"); Router::route("^support/tickets/departments/(.+)", "/support_manager/client_tickets/departments/$1"); Kinda unrelated to this thread, but the URI in links are set in the view (.pdt) files. Routes simply control what URIs can be used to access a particular application path. So you would need to update the views to contain the format of the route you define. You might say, well that kind of suck, and yes, it does. The solution for that would be reverse routing, but the minPHP routing engine doesn't (currently) support it, so Blesta doesn't support it. Michael 1
Michael Posted June 25, 2015 Report Posted June 25, 2015 Kinda unrelated to this thread, but the URI in links are set in the view (.pdt) files. Routes simply control what URIs can be used to access a particular application path. So you would need to update the views to contain the format of the route you define. You might say, well that kind of suck, and yes, it does. The solution for that would be reverse routing, but the minPHP routing engine doesn't (currently) support it, so Blesta doesn't support it. merci mate will try that.
kpmedia Posted September 6, 2015 Report Posted September 6, 2015 I may do this. @Michael: Do you have it working well, to have alternate URLs?
Michael Posted September 6, 2015 Report Posted September 6, 2015 I may do this. @Michael: Do you have it working well, to have alternate URLs? nope.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now