dr Grzegorz Czelej

dr Grzegorz Czelej

Senator RP

Praca w Senacie

<?php

$menu_trail= _menu_get_active_trail();
$menu_top_level = array_shift( $menu_trail);

$menu_sub_menu = array_shift( $menu_trail);
$item = menu_get_item($menu_sub_menu);
print_r($menu_sub_menu);

$result = db_query_range('SELECT mid FROM menu WHERE pid = %d ORDER BY weight', $menu_sub_menu, 0, 1);
if ($node = db_fetch_object($result)) {
$item2 = menu_get_item($node->mid);
}

drupal_goto($item2['path']);

?>