<?php get_header();?>
		<div id="content">		
			<!-- primary content start -->
			<?php if ($posts) {
				if (get_settings('terrafirma_asideid') != "")
					$AsideId = get_settings('terrafirma_asideid');
				function stupid_hack($str)
				{
					return preg_replace('|</ul>\s*<ul class="asides">|', '', $str);
				}
				ob_start('stupid_hack');
				foreach($posts as $post)
				{
					the_post();
				?>
				<?php if ( in_category($AsideId) ) : ?>
					<ul class="asides">
						<li id="p<?php the_ID(); ?>">
							<?php echo wptexturize($post->post_content); ?>							
							<br/>
							<?php comments_popup_link('(0)', '(1)','(%)')?>  | <a href="<?php the_permalink(); ?>" title="Permalink: <?php echo wptexturize(strip_tags(stripslashes($post->post_title), '')); ?>" rel="bookmark">#</a> <?php edit_post_link('(Bearbeiten)'); ?>
						</li>						
					</ul>
					<?php else: // If it's a regular post or a permalink page ?>
						<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('Den ganzen Beitrag lesen &raquo;'); ?>
								<?php wp_link_pages(); ?>
                <p class="post-tags">
                  <?php if (function_exists('the_tags')) the_tags('Tags: ', ', ', '<br/>'); ?>
                </p>
							</div>
							<div class="footer">
								<ul>
									<li class="readmore"><?php the_category(' , ') ?> <?php edit_post_link('Bearbeiten'); ?></li>
									<li class="comments"><?php comments_popup_link('Keine Kommentare', 'Ein Kommentar', '% Kommentare'); ?></li>						
								</ul>
							</div>				
						</div>	
					<?php endif; // end if in category ?>
				<?php
				}
			}
			else
			{
				echo '<p>Beitrag / Seite nicht gefunden.</p>';
			}
		?>
		<p align="center"><?php posts_nav_link(' - ','&#171; Vorherige Eintr&auml;ge','N&auml;chste Eintr&auml;ge &#187;') ?></p>		
		<!-- primary content end -->	
		</div>		
	<?php get_sidebar();?>	
<?php get_footer();?>