SEO - make sure module and controller name are in lowercase
For module controller, make sure that the name of the controller and the module are saved in lowercase. Otherwise the route will not be found in getModuleLink.
This commit is contained in:
1 parent
f9cfde9a05
commit
8d7e96176c
1 file changed
+2
-2
+2
-2
@@ -85,11 +85,11 @@ class MetaCore extends ObjectModel
|
||||
// Add modules controllers to list (this function is cool !)
|
||||
foreach (glob(_PS_MODULE_DIR_.'*/controllers/front/*.php') as $file)
|
||||
{
|
||||
$filename = basename($file, '.php');
|
||||
$filename = strtolower(basename($file, '.php'));
|
||||
if ($filename == 'index')
|
||||
continue;
|
||||
|
||||
$module = basename(dirname(dirname(dirname($file))));
|
||||
$module = strtolower(basename(dirname(dirname(dirname($file)))));
|
||||
$selected_pages[$module.' - '.$filename] = 'module-'.$module.'-'.$filename;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user