Index: template-functions-post.php
===================================================================
--- template-functions-post.php	(revision 2495)
+++ template-functions-post.php	(working copy)
@@ -311,15 +311,18 @@
 	if (!isset($r['depth'])) $r['depth'] = 0;
 	if (!isset($r['show_date'])) $r['show_date'] = '';
 	if (!isset($r['child_of'])) $r['child_of'] = 0;
-	if ( !isset($r['title_li']) ) $r['title_li'] = __('Pages');
+	if (!isset($r['title_li']) ) $r['title_li'] = __('Pages');
+	if (!isset($r['style'])) $r['style'] = 'list';
 
-
 	// Query pages.
 	$pages = & get_pages($args);
 	if ( $pages ) :
 
-	if ( $r['title_li'] )
+	if ( $r['title_li'] && 'list' == $r['style'] )
 		echo '<li id="pagenav">' . $r['title_li'] . '<ul>';
+	else
+		echo "<select name='page_id'>\n";
+
 	// Now loop over all pages that were selected
 	$page_tree = Array();
 	foreach($pages as $page) {
@@ -350,8 +353,10 @@
 	// Output of the pages starting with child_of as the root ID.
 	// child_of defaults to 0 if not supplied in the query.
 	_page_level_out($r['child_of'],$page_tree, $r);
-	if ( $r['title_li'] )
+	if ( $r['title_li'] && 'list' == $r['style'] )
 		echo '</ul></li>';
+	else
+		echo "</select>\n";
 	endif;
 }
 
@@ -360,39 +365,53 @@
 
 	$queried_obj = $wp_query->get_queried_object();
 
-	if($depth)
+	if ($depth) {
 		$indent = str_repeat("\t", $depth);
-	//$indent = join('', array_fill(0,$depth,"\t"));
+		$pad = str_repeat('&nbsp;', $depth * 3);
+	}
 
 	foreach($page_tree[$parent]['children'] as $page_id) {
 		$cur_page = $page_tree[$page_id];
 		$title = $cur_page['title'];
 
-		$css_class = 'page_item';
-		if( $page_id == $queried_obj->ID) {
-			$css_class .= ' current_page_item';
-		}
-
-		echo $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page_id) . '" title="' . wp_specialchars($title) . '">' . $title . '</a>';
-
-		if(isset($cur_page['ts'])) {
-			$format = get_settings('date_format');
+		if ('list' == $args['style']) {
+			$css_class = 'page_item';
+			if( $page_id == $queried_obj->ID) {
+				$css_class .= ' current_page_item';
+			}
+			
+			echo $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page_id) . '" title="' . wp_specialchars($title) . '">' . $title . '</a>';
+			
+			if(isset($cur_page['ts'])) {
+				$format = get_settings('date_format');
 			if(isset($args['date_format']))
 				$format = $args['date_format'];
 			echo " " . mysql2date($format,$cur_page['ts']);
-		}
-		echo "\n";
-
-		if(isset($cur_page['children']) && is_array($cur_page['children'])) {
-			$new_depth = $depth + 1;
-
-			if(!$args['depth'] || $depth < ($args['depth']-1)) {
-				echo "$indent<ul>\n";
-				_page_level_out($page_id,$page_tree, $args, $new_depth);
-				echo "$indent</ul>\n";
 			}
+			echo "\n";
+			
+			if(isset($cur_page['children']) && is_array($cur_page['children'])) {
+				$new_depth = $depth + 1;
+				
+				if(!$args['depth'] || $depth < ($args['depth']-1)) {
+					echo "$indent<ul>\n";
+					_page_level_out($page_id, $page_tree, $args, $new_depth);
+					echo "$indent</ul>\n";
+				}
+			}
+			echo "$indent</li>\n";
+		} elseif ('dropdown' == $args['style']) {
+			echo "\t<option value=\"".$page_id."\"";
+			if ($page_id == $queried_obj->ID)
+				echo ' selected="selected"';
+			echo '>';
+			echo "$pad$title";
+			echo "</option>\n";
+			if(isset($cur_page['children']) && is_array($cur_page['children'])) {
+				$new_depth = $depth + 1;
+				_page_level_out($page_id, $page_tree, $args, $new_depth);
+			}
 		}
-		echo "$indent</li>\n";
 	}
 }
 

