

<?php if ($_products = $this->getRecentlyViewedProducts()): ?>
<div class="widget widget-viewed">

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

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

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

    <?php $suffix = $this->getNameInLayout(); ?>
    <ol class="mini-products-images-list" id="widget-viewed-<?php echo $suffix; ?>">
    <?php foreach ($_products as $_product): ?>
        <li class="item">
            <a class="product-image" href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(76) ?>" width="76" height="76" alt="<?php echo $this->stripTags($_product->getName(), null, true) ?>" /></a>
        </li>
    <?php endforeach; ?>
    </ol>
    <script type="text/javascript">decorateList('widget-viewed-<?php echo $suffix; ?>', 'none-recursive')</script>
    
<?php echo $_tpl->render($this) ?>

</div>

<?php endif; ?>
