Hello, so none develper needing assistance...
I am trying to change a class tag to a sub menus <ul> tag within Drupal 7. I have a main nav and sub nav each has the class - menu.
I am trying to change the sub nav class attribute. So...
<ul class="menu">
<li>
<ul class="menu">
<li>
What I am trying to do is cahnge the second class to be class="sub-menu".
I am trying something like this...
function nasaepdn_menu_tree($variables) {
if (preg_match("/\bKEYWORD-submenu\b/i", $variables['tree'])){
return '<ul class="menu KEYWORD-menu">' . $variables['tree'] . '</ul>';
} else {
return '<ul class="menu KEYWORD-submenu">' . $variables['tree'] . '</ul>';
}
}
But I am not familiar enough to get it to do what I want. IF you have any suggestions or links to help me figure it out that would be awesome!
Thanks
Tim