<?php
/*
Template Name: Archives
*/
?>
<?php get_header(); ?>

<div id="centerTL">
<div id="centerTR">
<div id="centerBR">
<div id="centerBL">
	<div id="container">
		<div id="left">

			<div class="post" id="post-<?php the_ID(); ?>">
				<div class="postHeader">
				<h2 class="pageTitle"><a href="<?php the_permalink() ?>" title="Permanenter Link zu &laquo;<?php the_title(); ?>&raquo;"><?php the_title(); ?></a></h2>
				</div>
				
				<div class="postBody">
				<p><?php edit_post_link('Bearbeiten','',''); ?></p>
				<h3>Letzte 20 Beitr&auml;ge</h3>
					<ul>
					<?php $posts = query_posts('showposts=20');?>			

					<?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
						<li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanenter Link: <?php the_title(); ?>"><?php the_title(); ?></a>  -  <em><?php the_time('j. F Y'); ?></em></li>
					<?php endforeach; else: ?>

					<p><?php _e('Sorry, keinen Beitrag gefunden.'); ?></p>
					<?php endif; ?>		
					</ul>					

				<h3><?php _e('Nach Monaten'); ?></h3>
					<ul><?php wp_get_archives('type=monthly'); ?></ul>

				<h3><?php _e('Nach Kategorien'); ?></h3>
					<ul id="archive-cat"><?php wp_list_cats('optioncount=1'); ?></ul>						

				</div>
			
				<div class="postFooter">
				</div>
			</div>

		</div>

<?php get_sidebar(); ?>

<?php get_footer(); ?>
