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

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

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

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

    <?php $suffix = $this->getNameInLayout(); ?>
    <ol id="widget-compared-<?php echo $suffix; ?>">
    <?php $i=0; foreach ($_products as $_product): ?>
        <li class="item">
            <p class="product-name"><a href="<?php echo $_product->getProductUrl() ?>"><?php echo $this->helper('catalog/output')->productAttribute($_product, $_product->getName() , 'name') ?></a></p>
        </li>
    <?php endforeach; ?>
    </ol>
    <script type="text/javascript">decorateList('widget-compared-<?php echo $suffix; ?>', 'none-recursive')</script>
    
<?php echo $_tpl->render($this) ?>

</div>

<?php endif; ?>
