Fusionmenu is the absolutely stunning menu system used by RocketTheme.  A couple of weeks back I was requested to add an “onClick” field to links within fusionmenu, which by default, isn’t an option.  I saw some code within the menu that looked like it was supported, or will be supported at some point, but was unable to get the existing code to work correctly.  These were the steps I took to create the functionality it on Joomla 1.7.3.

Adding Field to Administration Menu

Edit /templates/<your template>/html/mod_roknavmenu/themes/gantry-fusion/item.xml.  Before the closing </fieldset>, add the following:

onclick' event to anchor tag"/>

Adding Functionality

In the same directory, edit layout.php.  Find the line that’s commented with, “not so elegant solution to add subtext” and add this above it:

            if ($item->hasLink()) {
                if ($item_params->get('fusion_onclick')) {
                    $fusion_onclick = 'onclick="' . $item_params->get('fusion_onclick') . '" ';
                }
                elseif ($item->hasAttribute('onclick')) {
                    $fusion_onclick = 'onclick="' . $item->getAttribute('onclick') . '" ';
                }
                else { $fusion_onclick = ''; }
            }

About 30 lines down from that, there should be this line: