Jump to content

How to make custom module controller url part translatable


soee

Recommended Posts

Hi,

if i have custom module with hook to register module routes like this:
 

'module-test-groups' => [
	'controller' => 'groups',
	'rule' => 'groups',
	'keywords' => [
		'module' => ['regexp' => '[_a-zA-Z0-9_-]+', 'param' => 'module'],
		'controller' => ['regexp' => '[_a-zA-Z0-9_-]+', 'param' => 'controller'],
	],
	'params' => [
		'fc' => 'module',
		'module' => 'test',
		'controller' => 'groups',
	]
],

than how can i force PrestaShop to use meta data for this controller from database and replace in rewrited url `groups` part with localized `grupy` word:
`domain.com/groups` to be in current language `domain.com/grupy`. My controller uses meta title and description set for controller in database but i can't make the url part to be generated using friendly url value form meta data.

 

PrestaShop: 1.7.2.x

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...