<?php
/**
 * Portfolio Category Template
 *
 * Displaying list of portfolio post for taxonomy page.
 *
 * @author jason.xie@victheme.com
 */
?>
<?php get_header(); ?>

  <div id="maincontent" class="area clearfix animated in fadeInLeft startblank">
    <div class="container-fluid">
      <div class="row">

        <div id="content"
             class="region
			     <?php if (VTCore_Zeus_Utility::getSidebar('portfolio_teaser')) {
               echo VTCore_Zeus_Utility::getColumnSize('content');
             } ?>
			     with-sidebar-<?php echo VTCore_Zeus_Utility::getSidebar('portfolio_teaser'); ?>"
          >

          <?php
          global $wp_query;

          // Retrieving Portfolio Configuration
          // This can be configured via Portfolio Configuration Page
          if (!isset($portfolioConfigObject)) {
            $portfolioConfigObject = new VTCore_Portfolio_Config();
          }

          // Building Variables to be passed to the loop template
          //$query = new WP_Query($argument);
          if (!isset($query)) {
            $query = $wp_query;
          }

          if (!isset($posts)) {
            $posts = $query->get_posts();
          }

          // Uncomment this to override the display mode configured from the GUI
          // $mode = ""; // grid or list.


          // Call the portfolio main loop template
          include VTCore_Wordpress_Utility::locateTemplate('portfolio-loop.php');

          // Build the pager
          $pager = VTCore_Zeus_Utility::getPager($query, FALSE, 'portfolio_main');
          if (!empty($pager)) {
            echo '<div class="pagination pagination-left">' . $pager . '</div>';
          }
          ?>
        </div>

        <?php
        // Build sidebar.
        if (VTCore_Zeus_Utility::getSidebar('portfolio_teaser') == 'right'
          || VTCore_Zeus_Utility::getSidebar('portfolio_teaser') == 'left'
        ) {
          get_sidebar('sidebar');
        }
        ?>

      </div>
    </div>
  </div>


<?php get_footer(); ?>