<?php get_header(); ?>	
	<div id="content">		
		<!-- Primary content: Stuff that goes in the primary content column (by default, the left column) -->
		<div id="primarycontainer">
			<div id="primarycontent">
				<div id="contentarea"><!-- Primary content area start -->
				<?php if ($posts) {
					foreach($posts as $post)
					{
						start_wp();
					?>
					<div class="post" id="post-<?php the_ID(); ?>">
						<h4><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h4>
						<div class="contentarea">
							<p class="details"><span class="user"><?php the_author_posts_link() ?></span> <span class="date"><?php the_time('j. F Y') ?></span> <?php edit_post_link('Bearbeiten'); ?></p>	
							<?php the_content('Den ganzen Beitrag lesen &raquo;'); ?>
							<?php $sub_pages = wp_list_pages( 'sort_column=menu_order&depth=1&title_li=&echo=0&child_of=' . $id );?>
								<?php if ($sub_pages <> "" ){?>
									<p>Diese Seite hat folgende Unterseiten:</p>
									<ul><?php echo $sub_pages; ?></ul>
								<?php }?>											
							<ul class="controls">
								<li class="comments"><?php comments_number('Keine Kommentare', '1 Kommentar', '% Kommentare'); ?></li>									
							</ul>
						</div>
					</div>		
					<?php comments_template();?>					
					<?php
					} /* end for "for-each" */
				}/* end for "if posts" */
				else
				{
					echo '<p>Keine Beitr&auml;ge entsprechen Deinen Kriterien.</p>';
				}
				?>
				<p align="center"><?php posts_nav_link(' - ','&#171; Vorherige Eintr&auml;ge','N&auml;chste Eintr&auml;ge &#187;') ?></p>
				
			</div><!-- primarycontent end -->
		</div><!-- primarycontainer end -->
	</div><!--content end -->
<?php get_sidebar(); ?>
<?php get_footer();?>