Jump to content

Overriding blocktopmenu css in new theme not working


Recommended Posts

I am new to prestahsop and currently modifying the css. To edit the top menu css, I have created a directory called "blocktopmenu" in my theme called "newtheme" 's module directory. To override the default cs, I created a css called "blocktopmenu.css" within the css directory. So the path of the blocktopmenu.css is "/myytheme/modules/blocktopmenu/css/blocktopmenu.css". But the CSS is not working.

 

I want to kinow how I can over ride the default css behaviour of the module? Thanks

  • Like 1
Link to comment
Share on other sites

Hello,

 

You should specify that you want to use that CSS. To do this you need to add the following call into the setMedia() method of your controller inheriting from a ModuleFrontController:

 

// Add our specific Cascading Style Sheet needs for this controller

$this->context->controller->addCSS(_MODULE_DIR_.$this->module->name.'/views/css/yourCSS.css');

 

hope this helps! If you need anything additional , please refer to the development documentation which is quite nice.

 

BR,

RaPhiuS

  • Like 1
Link to comment
Share on other sites

Hello,

 

You should specify that you want to use that CSS. To do this you need to add the following call into the setMedia() method of your controller inheriting from a ModuleFrontController:

 

// Add our specific Cascading Style Sheet needs for this controller

$this->context->controller->addCSS(_MODULE_DIR_.$this->module->name.'/views/css/yourCSS.css');

 

hope this helps! If you need anything additional , please refer to the development documentation which is quite nice.

 

BR,

RaPhiuS

 

 

Thanks for your reply. But what if I want to build the menu as independed one ?

Link to comment
Share on other sites

×
×
  • Create New...