[*] MO : updated module homeslider for mobile theme

This commit is contained in:
mBertholino
2012-02-28 09:11:27 +00:00
parent 398140cf17
commit 3ac2f335bf
2 changed files with 59 additions and 2 deletions
+15 -2
View File
@@ -610,7 +610,7 @@ class HomeSlider extends Module
$this->_html .= $this->displayConfirmation($this->l('Slide added'));
}
public function hookHome()
private function _prepareHook()
{
$slider = array(
'width' => Configuration::get('HOMESLIDER_WIDTH'),
@@ -621,11 +621,17 @@ class HomeSlider extends Module
$slides = $this->getSlides(true);
if (!$slides)
return;
return false;
$this->smarty->assign('homeslider_slides', $slides);
$this->smarty->assign('homeslider', $slider);
return true;
}
public function hookHome()
{
if(!$this->_prepareHook())
return;
return $this->display(__FILE__, 'homeslider.tpl');
}
@@ -639,6 +645,13 @@ class HomeSlider extends Module
$this->context->controller->addJS($this->_path.'js/homeslider.js');
}
public function hookDisplayMobileIndex()
{
if(!$this->_prepareHook())
return;
return $this->display(__FILE__, 'homemobileslider.tpl');
}
public function headerHTML()
{
if (Tools::getValue('controller') != 'AdminModules' && Tools::getValue('configure') != $this->name)