Pre-Select item if current page is in trail
Cybso - August 31, 2008 - 14:20
| Project: | Quickmenu |
| Version: | 5.x-1.3 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
To preselect an item if the page is within the active trail, apply the following modifications to quickmenu.module.
Find the following line in function quickmenu_block (case 'view'):
$block_content .= '<option value="' . $the_link . '">' . $qm_full_menu['items'][$child_mid]['title'] . "</option>\n";
and replace it with the following lines:
$selected = menu_in_active_trail($child_mid) ? ' selected' : '';
$block_content .= '<option value="' . $the_link . '"'.$selected.'>' . $qm_full_menu['items'][$child_mid]['title'] . "</option>\n";