/** * Assign meta title, description and keyword for the template * * @param array $params * @param \Smarty $smarty */ public function changeSeoMeta($params, &$smarty) { // Get language and moduleConfig $locale = $params['locale']; // Get store title $smarty->assign("store_name", StoreSeo::getConfigValue('title', null, $locale)); // Get store description $smarty->assign("store_description", StoreSeo::getConfigValue('description', null, $locale)); // Get store keywords $smarty->assign("default_keywords", StoreSeo::getConfigValue('keywords', null, $locale)); }
public function defaultAction() { if (null !== ($response = $this->checkAuth([AdminResources::MODULE], ["storeseo"], AccessManager::VIEW))) { return $response; } // Get current edition language locale $locale = $this->getCurrentEditionLocale(); $form = $this->createForm("storeseo_form_config", 'form', ['title' => StoreSeo::getConfigValue('title', null, $locale), 'description' => StoreSeo::getConfigValue('description', null, $locale), 'keywords' => StoreSeo::getConfigValue('keywords', null, $locale)]); $this->getParserContext()->addForm($form); return $this->render("storeseo-configuration"); }