PDA

View Full Version : "Dynamenu" for osCommerce - Dynamic Fly-Out, Drop-Down, Tree Category Menu



michael_s
11-25-2007, 04:17 AM
When you install DynaMenu and use the "treemenu" style, the first item of menu doesn't collapse/expand when clicked.

I have finally found the error! :-)

Look for this row in treemenu.inc.php

$a_href_open = '<a href="' . $this->tree[$cnt]['parsed_href'] . '"' . $this->tree[$cnt]['parsed_title'] . ' class="' . $linkstyle . ' '. $this->tree[$cnt]['parsed_target']. '">';


and simply substitute it whit this one:
$a_href_open = '<a onmousedown="' . $toggle_function_name . '('' . $cnt . '')" href="' . $this->tree[$cnt]['parsed_href'] . '"' . $this->tree[$cnt]['parsed_title'] . ' class="' . $linkstyle . ' '. $this->tree[$cnt]['parsed_target']. '">';

The errore was caused by the lacking of the toggle function in some branches.

I hope it will help you all: I have "wasted" more than a couple of days in lookinfg for such a solution :-/

(great contribution anyway, thanks for it!!)

More... (http://addons.oscommerce.com/info/4228)