One merchandise in Drupal Development Company menu has sub-items that time to Drupal Development Company similar web page (simply with completely different arguments) ex:
Merchandise – Listing merchandise 1 merchandise?pid=1 – Listing merchandise 2 merchandise?pid=2 – Listing merchandise 3 merchandise?pid=3
Drupal assigns Drupal Development Company “energetic” class in Drupal Development Company
I am overwriting Drupal Development Company menu_link perform in template.php to take away Drupal Development Company energetic class however Drupal Development Company class stays in Drupal Development Company tag
perform mytheme_menu_link(array $variables) { $factor = $variables['element']; $sub_menu = ''; if ($factor['#below']) { if (strtolower($factor['#title']) == 'Merchandise') { if (isset($_GET['pid'])) { $currID = $_GET['pid']; foreach ($factor['#below'] as $Taxonomy) { if ($currTaxonomyID != $Taxonomy['#localized_options']['query']['pid']) { $mlid = $Taxonomy['#original_link']['mlid']; $key = array_search('energetic', $Taxonomy['#attributes']['class'], TRUE); if ($key) { unset($factor['#below'][$mlid]['#attributes']['class'][$key]); $factor['#below'][$mlid]['#localized_options']['attributes']['class'][$key] = ''; } // take away active-trail class $key = array_search('active-trail', $Taxonomy['#attributes']['class'], TRUE); if ($key) { $factor['#below'][$mlid]['#attributes']['class'][$key] = ''; } } } } } $sub_menu = drupal_render($factor['#below']); } $output = l($factor['#title'], $factor['#href'], $factor['#localized_options']); return '<li' . drupal_attributes($factor['#attributes']) . '>' . $output . $sub_menu . "</li>n"; }
Ultimate End result:
<ul class="menu nav"> <li class="first leaf menu-mlid-44253"> <a href="/merchandise?pid=1" title="Greatest Practices" class="energetic">Greatest Practices</a> </li> <li class="leaf menu-mlid-44254"> <a href="/merchandise?pid=2" title="Checklists" class=" energetic">Checklists</a> </li> ....
How can I take away Drupal Development Company class “energetic” from Drupal Development Company tag?
My menu Construction:
-Shoppers -Merchandise -prod1 (url:merchandise?pid=1) -prod2 (url:merchandise?pid=2) -prod3 (url:merchandise?pid=3) -prod4 (url:merchandise?pid=4) -About