--- local_menu.module	di jun 15 21:40:26 2010
+++ local_menu.module	di jun 15 21:26:49 2010
@@ -46,6 +46,12 @@
       ),
       '#default_value' => variable_get('local_menu_depth', LOCAL_MENU_UNLIMITED),
     );
+	$form['local_menu_include_parent'] = array(
+		'#type' => 'checkbox',
+		'#title' => t('Include parent as menu item.'),
+		'#description' => t('Check the box if you want the parent of this menu tree to be included in the local menu'),
+		'#default_value' => variable_get('local_menu_include_parent', 0),								   
+	);
     $names = array();
     $result = db_query("SELECT DISTINCT(menu_name) FROM {menu_links} ORDER BY menu_name");
     while ($name = db_fetch_array($result)) {
@@ -63,6 +69,7 @@
   elseif ($op == 'save') {
     variable_set('local_menu_start', $edit['local_menu_start']);
     variable_set('local_menu_depth', $edit['local_menu_depth']);
+	variable_set('local_menu_include_parent', $edit['local_menu_include_parent']);
     variable_set('local_menu_exclusions', $edit['local_menu_exclusions']);
   }
   elseif ($op == 'view') {
@@ -164,8 +171,14 @@
       if ($start == $data['link']['depth'] + 1) {
         local_menu_title($data['link']['title']);
       }
-
-      $output = local_menu_content($data['below'], $start, $depth - 1);
+		if(variable_get('local_menu_include_parent', 0)) {	  
+			$link = theme('menu_item_link', $data['link']);
+			$below = ($depth > 1 && $data['below']) ? local_menu_content($data['below'], $start, $depth - 1) : '';
+			$output .= theme('menu_item', $link, $data['link']['has_children'], $below, $data['link']['in_active_trail'], $extra_class);
+			$output = theme('menu_tree', $output);
+		} else {
+      		$output .= local_menu_content($data['below'], $start, $depth - 1);
+		}
     }
   }
 
