Add dynamic prefix into url

Dear guys,

I want to add dynamic prefix into url

How do it by cakephp, please?

Sorry if i have post mistake.

when user choose location en-us or ja-jp. url or category-machine, category-sport became as bellow

What version of CakePHP?

I didn’t do it.but i think you can do it.You must load model on route and generate prefix with all fields on your Model.that is hard.I don’t know what is good in github maybe you will find a plugin or component.good luck

thank you for reading,
I’m using cakephp 3.2

thank for reading,
i have searched on github but have not plugin,
you can write some simple demo to do it?

This plugin should do what you need:

Updated: Did not notice the Cakephp version, for Cake 3 check:

1 Like

thank guys
i will try it now