<?php get_header(); ?>

    <?php if (have_posts()) : ?>

         <?php $post $posts[0]; ?>

        <?php /* If this is a category Arkiv */ if (is_category()) { ?>
            <h2 class="pagetitle">Indlæg i kategorien '<?php echo single_cat_title(); ?>'</h2>

        <?php /* If this is a daily Arkiv */ } elseif (is_day()) { ?>
            <h2 class="pagetitle">Indlæg fra <?php the_time('j. F Y'); ?></h2>

        <?php /* If this is a monthly Arkiv */ } elseif (is_month()) { ?>
            <h2 class="pagetitle">Indlæg fra <?php print ucfirst(get_the_time('F Y')); ?></h2>

        <?php /* If this is a yearly Arkiv */ } elseif (is_year()) { ?>
            <h2 class="pagetitle">Indlæg fra <?php the_time('Y'); ?></h2>

        <?php /* If this is a search */ } elseif (is_search()) { ?>
            <h2 class="pagetitle">Søgeresultater</h2>

        <?php /* If this is an author Arkiv */ } elseif (is_author()) {
            
$authordata=get_userdata($post->post_author);
            
$author=sf_theme_linked_author_name($authordata);
            
?>
            <h2 class="pagetitle">Indlæg af <?php print $author?></h2>

        <?php /* If this is a paged Arkiv */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
            <h2 class="pagetitle">Indlæg</h2>

        <?php ?>

    <div class="navigation">
        <div class="alignleft"><?php next_posts_link('&laquo; Tidligere indlæg'?></div>
        <div class="alignright"><?php previous_posts_link('Senere indlæg &raquo;'?></div>
    </div>

    <?php while (have_posts()) : the_post(); ?>

        <?php print sf_theme_box_top('<a href="'.get_permalink().'" rel="bookmark" title="'.get_the_title().'">'.get_the_title().'</a>''artikelbox'); ?>

                <?php print sf_theme_postmeta(); ?>
                <div class="teaser">
                    <?php print sf_theme_get_the_teaser(); ?>
                </div>

        <?php print sf_theme_box_bottom('<a href="'.get_permalink().'" title="'.get_the_title().'"> </a>'); ?>
    
    <?php endwhile; ?>

    <div class="navigation">
        <div class="alignleft"><?php next_posts_link('&laquo; Tidligere indlæg'?></div>
        <div class="alignright"><?php previous_posts_link('Senere indlæg &raquo;'?></div>
    </div>

    <?php else : ?>

        <?php include (TEMPLATEPATH "/searchmessage.php"); ?>

    <?php endif; ?>
        
<?php get_footer(); ?>