Ok after testing I have figured out the proper answer. Now this solution is in general and should work well for any menu and dropdown menu structure within Joomla's default menu system.
I have complete this solution with Foundation 5 menu setup (later I will try a different menu system but the idea should be the same).
For the menu module go to the default.php located here: /modules/mod_menu/tmpl
The default setting has a class structure of nav menu as such:
<ul class="nav menu<?php echo $class_sfx;?>"<?php
$tag = '';
Change the class to be what you need the class structure to be. if you are 100% circumventing the Joomla css (bootstrap) file structure then you can change it... or if not you can just add a class name(s) that you need.
here is what mine changed to:
<ul class="right nav menu<?php echo $class_sfx;?>"<?php
$tag = '';
Now if you are following your new menu system's class structure (Foundation) you might need to designate a class for <li
and for the sub menu items i.e. for a dropdown menu.
***Keep in mind that for Joomla's menu structure within PHP it pulls the item number and if it is the current page it will auto mark it as auto (automatically)... so no need to add that in except for the class you are adding. Edit* Adding the class "has-dropdown" should be for the parent
so on this line (the before):
if ($item->parent)
{
$class .= ' parent';
}
Change it to this (the after):
if ($item->parent)
{
$class .= ' has-dropdown parent';
}
As well the sub child items need to change.
So on this line (the before):
// The next item is deeper.
if ($item->deeper)
{
echo '<ul class="nav-child unstyled small">';
}
Change it to this (the after):
// The next item is deeper.
if ($item->deeper)
{
echo '<ul class="dropdown nav-child unstyled small">';
}
I think it would be great to add a plug-in that can mod the backend menu setup to include class to add to or change for <ul
and <li
for both menu and sub menu child items.
Hopefully this helps someone... I will add more later.
*I have one error I am getting with this and the Foundation menu I am using. The first child will show but if that child has a child menu item it won't show... So there's that fix still needed.
*remember to change the setting: Show Sub-menu Items to "yes"