Index: trunk/wp-content/themes/xpress_default/blocks/page_block_theme.php
===================================================================
--- trunk/wp-content/themes/xpress_default/blocks/page_block_theme.php	(revision 126)
+++ trunk/wp-content/themes/xpress_default/blocks/page_block_theme.php	(revision 127)
@@ -5,47 +5,40 @@
 	$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
 	$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_page_block.html' : trim( $options[1] );
-	$sort_column = empty( $options[2] ) ? 0 : $options[2] ;
-	$sort_order_asc = empty( $options[3] ) ? 0 : 1 ;
-	$show_date = empty( $options[4] ) ? 0 : 1 ;
-	$date_format = empty( $options[5] ) ? '' : $options[5] ;
+	$sort_column = empty( $options[2] ) ? 'post_title' : $options[2] ;
+	$sort_order = empty( $options[3] ) ? 'asc' : $options[3] ;
+	$exclude = empty( $options[4] ) ? '' : $options[4] ;
+	$exclude_tree = !is_numeric( $options[5] ) ? 0 : $options[5] ;
+	$includes = empty( $options[6] ) ? '' : $options[6] ;
+	$depth  = !is_numeric( $options[7] ) ? 0 : $options[7] ;
+	$child_of  = !is_numeric( $options[8] ) ? 0 : $options[8] ;
+	$show_date = empty( $options[9] ) ? 'none' : $options[9] ;
+	$date_format = empty( $options[10] ) ? '' : $options[10] ;
+	$hierarchical = empty( $options[11] ) ? false : true ;
+	$meta_key = empty( $options[12] ) ? '' : $options[12] ;
+	$meta_value = empty( $options[13] ) ? '' : $options[13] ;
 
-	switch ($sort_column) {
-		case 0:
-			$sort_column_name = 'post_title';
-			break ;
-		case 1:
-			$sort_column_name = 'post_date';
-			break ;
-		case 2:
-			$sort_column_name = 'menu_order';
-			break ;
-		default:
-			$sort_column_name = 'post_title';
-			break ;
-	}
 	if (empty($date_format)) $date_format = get_option('date_format');
-	if ($show_date) $show_date_name = 'post_date' ; else $show_date_name = '';
+	if ($exclude_tree == 0 ) $exclude_tree = '';
+	if ($show_date == 'none' ) $show_date = '';
+	
 	$parm = array(
-    	'depth'       => 0, 
-    	'title_li'    => '', 
-    	'show_date'   => $show_date_name,
-    	'date_format' => $date_format,
-    	'child_of'    => 0, 
-    	'exclude'     => '',
-    	'echo'        => 0,
-    	'authors'     => '',
-    	'sort_column' => $sort_column_name
+    	'sort_column'	=> $sort_column, 
+    	'sort_order'	=> $sort_order, 
+    	'exclude'		=> $exclude,
+    	'exclude_tree'	=> $exclude_tree,
+    	'include'		=> $includes,
+    	'depth'			=> $depth, 
+    	'child_of'		=> $child_of,
+    	'show_date'		=> $show_date,
+    	'date_format'	=> $date_format,
+    	'title_li'		=> '',
+    	'echo'			=> 0,
+    	'hierarchical'	=> $hierarchical,
+    	'meta_key'		=> $meta_key,
+    	'meta_value'	=> $meta_value
     );
 	
-	$content = wp_list_pages($parm);
-		$item_no = 0;
-		$row_data = array(
-			'page'		=> $content
-		);
-		$block['contents']['item'.$item_no] = $row_data;
-		$item_no++;
-
-	$block['data_count'] = $item_no;  //xml unserialise error
-
+	$output = "<ul>\n" . wp_list_pages($parm) . "\n</ul>\n";
+	$block['list_pages'] = $output;
 	return $block ;	
 }
