Jump to content

Module Category on the homepage


Recommended Posts

Bonjour

J'utilise ce module pour afficher les catégories en page d'accueil , le souci est que le module va me chercher les versions anglaises des noms et descriptions des catégories... J'ai un peu fouillé dans le code et j'ai trouvé qu'une ligne qui pourrait influer sur la langue :

 lang' => Language::getIsoById(intval($params['cookie']->id_lang)),



mais malgré mes nombreux tests rien a faire... Quelqu'un pourrait m'aider ?

Link to comment
Share on other sites

Bonjour,
essaie en remplaçant la fonction hookHome par celle-ci :

    function hookHome($params)
   {
       global $smarty, $cookie;    
       $category = new Category(1);
       $subCategories = $category->getSubCategories($cookie->id_lang);
       $nb = intval(Configuration::get('HOME_categories_NBR'));        
       $smarty->assign(array(
           'categoryHome' => $subCategories,
           'lang' => Language::getIsoById(intval($cookie->id_lang)),
       ));
       return $this->display(__FILE__, 'homecategories.tpl');
   }



et dans le fichier tpl, j'aurai tendance à modifier cette ligne :

getCatImageLink($category.link_rewrite, $category.id_image,'category-on-home')}" alt="{$category.name|escape:'htmlall':'UTF-8'}" />



par

getCatImageLink($category.link_rewrite, $category.id_image,'medium')}" alt="{$category.name|escape:'htmlall':'UTF-8'}" />



puis ajouter le contenu du fichier style.txt au global .css

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...