Last Updated: February 25, 2016
·
1.371K
· dubrod

Magento SEO Sitemap Style Config vs Simple Products

Template/Catalog/Seo/Sitemap.phtml

The following will echo any "Configurable" item as a <dt> and a simple item as a <dd> so you can edit your CSS accordingly to have different looks.

Usefull when your cart is heavily configurable.

    <dl class="sitemap">
    <?php 
    //echo "<pre>";
    //print_r($_items);
    foreach ($_items as $_item): 

        if($_item->type_id=="configurable"){
            //print_r($_item);
        ?>
            <dt>
                <a href="<?php echo $this->getItemUrl($_item) ?>"><?php echo $this->escapeHtml($_item->name) ?></a>
            </dt>
        <?php } else { ?>
            <dd>
                <a href="<?php echo $this->getItemUrl($_item) ?>"><?php echo $this->escapeHtml($_item->name) ?></a>
            </dd>
        <?php } ?>

    <?php endforeach; ?>
</dl>