
<?php if ($_products = $this->getRecentlyViewedProducts()): ?>

<?php $_tpl = Mage::helper('designer')->createTemplate($this->getBlockTemplate(), $this->getBlockId()) ?>
    
<?php $_tpl->section('header') ?>

<?php echo $this->__('Recently Viewed Products') ?>

<?php $_tpl->section('content') ?>

    

<ol id="recently-viewed-items">
        <?php foreach ($_products as $_item): ?>
            <li class="item">
                <p class="product-name"><a href="<?php echo $this->getProductUrl($_item) ?>"><?php echo $this->helper('catalog/output')->productAttribute($_item, $_item->getName() , 'name') ?></a></p>
            </li>
        <?php endforeach; ?>
        </ol>
        <script type="text/javascript">decorateList('recently-viewed-items');</script>
    
<?php echo $_tpl->render($this) ?>


<?php endif; ?>
