Jump to content

Trying to add another jquery menu to default blocktopmenu module


Recommended Posts

Hi. I've been trying to experiment with adding another menu to blocktopmenu module.

I tried this simple one.

http://javascript-array.com/scripts/jquery_simple_drop_down_menu/

First I was surprised that bloctopmenu module is not in the default theme module folder, however, it is pre-installed with the default theme. So, I had to edit files in root topblockmenu module folder.

 

Basically, I changed ul class to that of menu I wanted to install in blocktopmenu.tpl and changed paths in blocktopmenu.php to javascript file of new menu, jquery version and css template it is based on. I changed that in this section of topblockmenu.php

 

$this->context->controller->addJS($this->_path.'js/hoverIntent.js');

$this->context->controller->addJS($this->_path.'js/superfish-modified.js');

$this->context->controller->addCSS($this->_path.'css/superfish-modified.css');

 

After I saved changes nothing worked as I suspected. Of course, I missed something, because I am new to PHP, Javascript and Smarty. May be there is a way to add new menu, may be I should uninsall blocktopmenu module and add new menu from the scratch? However, I believe it would be difficult because this module links menu to so many variables and classes that it would be difficult to figure out how it works soon.

 

Please advise me on that.

 

Thanks in advance!

Link to comment
Share on other sites

IF you change any things and not effected you have to check performance tab, i think your cache is enable so new css is not affected.

Sorry, I forgot to mention that after I made changes the topmenu dissappeared and ul without any style left on the page. So the issue is not with cache.

Link to comment
Share on other sites

can you provide your site url so that i can suggest how to solve.

I replaced spoilt php tpl with new ones so the site now is ok. When the topmenu was broken the list of categories displayed as simple links without styling and not in menu. So the new script did not work while the default one was deleted. I just want to find out how new menu script can be integrated withint blocktopmenu php and tpl without breaking their integrity. What lines of code should be edited in each of these files.

Link to comment
Share on other sites

×
×
  • Create New...