<?php
/**
 * @version   1.23 January 15, 2012
 * @author    RocketTheme http://www.rockettheme.com
 * @copyright Copyright (C) 2007 - 2012 RocketTheme, LLC
 * @license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
 */
// no direct access
?>

<?php global $post, $posts, $query_string, $wp_query; ?>
<?php

$custom_page_title = null;
$custom_page_decs = null;
$show_category_desc = null;

if (is_category()) {
    $blog_style = $gantry->get('category-categoryblogstyle');
    $custom_page_title = $gantry->get('category-categorytitle');
    $custom_page_decs = $gantry->get('category-categorydesc');
    $show_category_desc = 1;
}

if (is_day() || is_month() || is_year() || is_author()) {
    $blog_style = $gantry->get('archive-categoryblogstyle');
}

if (is_tag()) {
    $blog_style = $gantry->get('tags-categoryblogstyle');
}
?>

<div class="rt-wordpress">
    <div class="rt-archive">
        <?php if ($show_category_desc) { ?>
            <?php if ($blog_style == 'blog2s' || $blog_style == 'blog2b') { ?>
                <?php if (strlen($custom_page_title)>0 || strlen($custom_page_decs)>0){ ?>
		 <div class="rt-blog-description-2">
		<?php if (strlen($custom_page_title)>0 ){ ?>
                    <h2><?php echo $custom_page_title; ?></h2>
		<?php } ?>
		<?php if (strlen($custom_page_decs)>0){ ?>
                    <p><?php echo $custom_page_decs; ?></p>
		<?php } ?>
                </div>
		<?php } ?>

                <?php /** Begin breadcrumbs * */ if ($gantry->countModules('breadcrumb')) : ?>
                    <div class="rt-blog-breadcrumbs2">
                        <div id="rt-breadcrumbs">
                            <div class="rt-container">
                                <?php echo $gantry->displayModules('breadcrumb', 'standard', 'standard'); ?>
                                <div class="clear"></div>
                            </div>
                        </div>
                    </div>
                <?php /** End breadcrumbs * */ endif; ?>
            <?php } ?>
        <?php } ?>

        <?php include "templates/blog/" . $blog_style . ".php"; ?>

    </div>
</div>