<?php get_header();?>

		<div id="content">
		
			<!-- primary content start -->
			<?php if (have_posts()) : ?>
		
		<?php while (have_posts()) : the_post(); ?>
			<div class="post" id="post-<?php the_ID(); ?>">
				<div class="header">
					<div class="date"><em class="user"><?php the_author() ?></em> <br/><em class="postdate"><?php the_time('d.m.Y') ?></em></div>
					<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>					
				</div>
				<div class="entry">
					<?php the_content(); ?>
          <?php wp_link_pages(); ?>
          <?php $sub_pages = wp_list_pages( 'sort_column=menu_order&depth=1&title_li=&echo=0&child_of=' . $id );?>
          <?php if ($sub_pages <> "" ){?>
          <h3>Liste der Unterseiten</h3>
          <ul>
            <?php echo $sub_pages; ?>
          </ul>
          <?php }?>
        </div>
				<div class="footer">
					<ul>
						<li class="comments"><?php comments_number('Keine Kommentare', 'Ein Kommentar', '% Kommentare'); ?></li>	
						<?php edit_post_link('<li class="readmore">Bearbeiten</li>'); ?>						
					</ul>
				</div>
				<?php comments_template(); ?>
			</div>	
		<?php endwhile; ?>
		<p align="center"><?php posts_nav_link(' - ','&#171; Vorherige Eintr&auml;ge','N&auml;chste Eintr&auml;ge &#187;') ?></p>		
	<?php else : ?>

		<h2 class="center">Nichts gefunden</h2>
	<?php endif; ?>
			<!-- primary content end -->	
		</div>		
	<?php get_sidebar();?>	
<?php get_footer();?>