PseT34 Posted September 21, 2010 Share Posted September 21, 2010 Bonjour,Je souhaite utiliser le module homeslideshow dans Top of pages, par défaut il est dans Homepage content.Cette modification est elle possible, et si oui comment ?Merci pour votre aide. Link to comment Share on other sites More sharing options...
PseT34 Posted September 21, 2010 Author Share Posted September 21, 2010 Je précise que dans le fichier : homeslideshow.phpj'ai modifié : if(!$this->registerHook('home')) return false; $this->updatePosition(Hook::get('home'),0,1); return true; par if(!$this->registerHook('top')) return false; $this->updatePosition(Hook::get('top'),0,1); return true; Link to comment Share on other sites More sharing options...
vincentmobile Posted March 2, 2011 Share Posted March 2, 2011 J'ai remplacé : public function hookHome($params){ global $smarty, $cookie; $pref = self::getPreferences(); $this->xml = simplexml_load_file(_PS_ROOT_DIR_.'/'.$this->xml_file); $lang_iso = Language::getIsoById(intval($cookie->id_lang)); $slides = $this->getAllSlidesByOrder($this->xml,$lang_iso,true); $smarty->assign(array('pref' => $pref,'default' => $this->default_values,'slides' => $slides)); return $this->display(__FILE__, 'homeslideshow.tpl'); } par cette fonction (par contre j'ai une erreur de parsing que je dois encore corriger) function hookTop($params) { global $smarty, $cookie; $pref = self::getPreferences(); $this->xml = simplexml_load_file(_PS_ROOT_DIR_.'/'.$this->xml_file); $lang_iso = Language::getIsoById(intval($cookie->id_lang)); $slides = $this->getAllSlidesByOrder($this->xml,$lang_iso,true); $smarty->assign(array('pref' => $pref,'default' => $this->default_values,'slides' => $slides)); return $this->display(__FILE__, 'homeslideshow.tpl'); } Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now