MyModule.module.php:
Code: Select all
function InitializeFrontend() {
// All
$this->RegisterRoute('/[MyModule\/(?P<IDart>[0-9-]+)_(?P<returnid>[0-9]+)_l(?P<filter_loc>[0-9]+)_t(?P<filter_tipo>[0-9]+)\/(?P<order_by>[a-z]+)\/(?P<filter_period>[A-Za-z0-9-]+)\/(?P<aliased_title>[A-Za-z0-9-]+)$/',array('action'=>'art_detail'));
//only with order_by
$this->RegisterRoute('/[MyModule\/(?P<IDart>[0-9-]+)_(?P<returnid>[0-9]+)\/(?P<order_by>[a-z]+)\/(?P<aliased_title>[A-Za-z0-9-]+)$/',array('action'=>'art_detail'));
etc...
Code: Select all
$aliased_title = munge_string_to_url($row['Title'],true);
I'm not able to find the reason why. Could someone give suggestions about this issue?
I also tried to use the method used in News module:
Code: Select all
$route = new CmsRoute('/[MyModule\/(?P<IDart>[0-9-]+)_(?P<returnid>[0-9]+)_l(?P<filter_loc>[0-9]+)_t(?P<filter_tipo>[0-9]+)\/(?P<order_by>[a-z]+)\/(?P<filter_period>[A-Za-z0-9-]+)\/(?P<aliased_title>[A-Za-z0-9-]+)$/',array('action'=>'art_detail'));
cms_route_manager::add_dynamic($route);
Furthermore (please have pity) which is the convenience of using add_static vs add_dynamic routes ?
Thank you