I am a bit in dead end trying to mane my routes in CakePHP. I read almost every article in the www and some of them close to what i need but combining with other dont work as expected. Also tried some router lib-s, but the same
Here is what I need:
Both language parameter in the url and a slug of the pages. So:
for the frontend
the directory '/' should lead to the default language,
controller=>pages,slug=>home/:lang - the same as above but with selected language
/:slug -
controller=>pages,action=>indexand to pass the:slugparameter, with default language/:lang/:slug - the same as above with set lang parameter
/:controller/:slug -
/:lang/:controller/:slug - the same as above with set lang parameter
- I dont need any
action-s in those linksfor the admin panel
/admin - 'controller' => 'settings', 'action' => 'index'
/admin/:controller/:action/ .... this one is the default
- no need for language parameter in the admin url, but actions exists, except the index action
Also how should I create the links inside the view, so the routers to be working as the should?