BartekPresta Posted January 13, 2022 Share Posted January 13, 2022 Is there any way to add programmatically a new page with friendly url? For now i need to manualy set for example "paypal - scorder" to rewritten url => /paypal-order Link to comment Share on other sites More sharing options...
endriu107 Posted January 13, 2022 Share Posted January 13, 2022 If you need this for your module you can use hookModuleRoutes to add friendry url to your module front controllers. Link to comment Share on other sites More sharing options...
BartekPresta Posted January 14, 2022 Author Share Posted January 14, 2022 @endriu107 How it should look? My actual implementation look like public function hookModuleRoutes($params): array { return [ 'module-moduleName-notification' => [ 'rule' => 'notification', 'keywords' => [], 'controller' => 'notification', 'params' => [ 'fc' => 'module', 'module' => 'moduleName' ] ] ]; } I want just register my controller "notification" to url notification. but it looks like it's not adding urls Link to comment Share on other sites More sharing options...
endriu107 Posted January 14, 2022 Share Posted January 14, 2022 Did you register this hook in install function and reinstall module? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now