Index: trunk/CHANGELOG
===================================================================
--- trunk/CHANGELOG	(revision 845)
+++ trunk/CHANGELOG	(revision 846)
@@ -12,7 +12,8 @@
 
 ------------------------------------- 2.7.1 -------------------------------------
 21-June-2008 Christian Sommer
-#	updated show_menu2 to version 4.60 (to avoid disappearing menus)
++	added output of block names to modify pages dialogue if blocks are enabled
+!	updated show_menu2 to version 4.60 (to avoid disappearing menus)
 08-Jun-2008 Thomas Hornik
 #	hebrew-table in charsets-table.php was faultily imported - fixed. Thanks to forum-member iti.
 24-May-2008 Christian Sommer
Index: trunk/wb/admin/pages/modify.php
===================================================================
--- trunk/wb/admin/pages/modify.php	(revision 845)
+++ trunk/wb/admin/pages/modify.php	(revision 846)
@@ -96,9 +96,24 @@
 $template->parse('main', 'main_block', false);
 $template->pparse('output', 'page');
 
+// get template used for the displayed page (for displaying block details)
+if (SECTION_BLOCKS) {
+	$sql = "SELECT `template` from `" . TABLE_PREFIX . "pages` WHERE `page_id` = '$page_id' ";
+	$result = $database->query($sql);
+	if ($result && $result->numRows() == 1) {
+		$row = $result->fetchRow();
+		$page_template = ($row['template'] == '') ? DEFAULT_TEMPLATE : $row['template'];
+		// include template info file if exists
+		if (file_exists(WB_PATH . '/templates/' . $page_template . '/info.php')) {
+			include_once(WB_PATH . '/templates/' . $page_template . '/info.php');
+		}
+	}
+}
+	
 // Get sections for this page
 $module_permissions = $_SESSION['MODULE_PERMISSIONS'];
-$query_sections = $database->query("SELECT section_id,module FROM ".TABLE_PREFIX."sections WHERE page_id = '$page_id' ORDER BY position ASC");
+$query_sections = $database->query("SELECT section_id, module, block 
+	FROM ".TABLE_PREFIX."sections WHERE page_id = '$page_id' ORDER BY position ASC");
 if($query_sections->numRows() > 0) {
 	while($section = $query_sections->fetchRow()) {
 		$section_id = $section['section_id'];
@@ -108,6 +123,19 @@
 			// Include the modules editing script if it exists
 			if(file_exists(WB_PATH.'/modules/'.$module.'/modify.php')) {
 				echo '<a name="'.$section_id.'"></a>';
+				// output block name if blocks are enabled
+				if (SECTION_BLOCKS) {
+					if (isset($block[$section['block']]) && trim(strip_tags(($block[$section['block']]))) != '') {
+						$block_name = htmlentities(strip_tags($block[$section['block']]));
+					} else {
+						if ($section['block'] == 1) {
+							$block_name = $TEXT['MAIN'];
+						} else {
+							$block_name = '#' . (int) $section['block'];
+						}
+					}
+					echo '<b>' . $TEXT['BLOCK'] . ': </b>' . $block_name;
+				}
 				require(WB_PATH.'/modules/'.$module.'/modify.php');
 			}
 		}
