Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function _custom_menu_overview_tree_form($tree) {
- $output = '';
- foreach ($tree as $data) {
- $item = $data['link'];
- if ($item && $item['hidden'] == 0) {
- if(strtolower($item['title']) == 'about us page condition'){
- $output .= '<li class="right-nav">';
- }else{
- $output .= '<li>';
- }
- (0 == $item['plid']) ? ($class = 'parent') : ($class = 'child');
- if(isset($item['options']['attributes'])) {
- $attributes = array('attributes' => array_merge($item['options']['attributes'], array('class' => array($class))));
- } else {
- $attributes = array('attributes' => array('class' => array($class)));
- }
- $output .= l($item['title'], $item['href'], $attributes);
- if ($data['below']) {
- $output .= '<ul class="sub-menu">' . _custom_menu_overview_tree_form($data['below']) . '</ul>';
- }
- $output .= '</li>';
- }
- }
- return $output;
- }
- $menu_items = menu_tree_all_data('your menu name');
- echo '<ul class="foot-nav">' . _custom_menu_overview_tree_form($menu_items) . '</ul>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement