function superfish_build_page_trail in Superfish 6
Same name and namespace in other branches
- 7 superfish.module \superfish_build_page_trail()
Builds the active trail from the page's menu data.
1 call to superfish_build_page_trail()
- theme_superfish in ./
superfish.module - Theme function to allow any menu tree to be themed as a Superfish menu.
File
- ./
superfish.module, line 1395 - Enables the use of jQuery Superfish plugin for Drupal menus.
Code
function superfish_build_page_trail($page_menu) {
$trail = array();
foreach ($page_menu as $item) {
if ($item['link']['in_active_trail'] || $item['link']['href'] == '<front>' && drupal_is_front_page()) {
$trail[] = $item['link']['mlid'];
}
if ($item['below']) {
$trail = array_merge($trail, superfish_build_page_trail($item['below']));
}
}
// Allows other modules to alter the active trail.
drupal_alter('superfish_active_trail', $trail);
return $trail;
}