Jump to content

My custom module Slider works only on my front module controller pages


Recommended Posts

My custom module Slider works only on my front module controller pages for example...see the screenshort..post-808397-0-82684400-1428772998_thumb.jpg

ie

http://localhost/prestashop9/index.php?fc=module&module=mymodule&controller=display

Why dont my slider module work on other pages like the index page? I have used the displaytop hook.This is my second slider module but I have been experiencing the same issue.

 

I have used the below functions...Can anyone tell me what have I done wrong..Is there a correct way to get this done?

public function hookHeader()
    {
        $this->context->controller->addCSS($this->_path.'/css/style.min.css');
        $this->context->controller->addCSS($this->_path.'/css/style.css');
    }

    public function hookDisplayTop()
    {
            $dir = $this->_path;
            $path = "$dir/views/img/";
             $this->context->smarty->assign(array(
            'path' => $path,
            ));
            $path1 =  $this->_path.'/views/templates';
            return $this->display(__FILE__, 'awesomeslider.tpl');
    }
Edited by JoelWebsites (see edit history)
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...