Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $category = Mage::getSingleton('catalog/layer')->getCurrentCategory();
- $categories = $category->getCollection()
- ->addAttributeToSelect(array('name', 'thumbnail'))
- ->addAttributeToFilter('is_active', 1)
- ->addIdFilter($category->getChildren())
- ?>
- <ul class="subcategories">
- <?php foreach ($categories as $category): ?>
- <li>
- <a href="<?php echo $category->getUrl() ?>"><img src="<?php echo Mage::getBaseUrl('media') . 'catalog' . DS . 'category' . DS . $category->getThumbnail() ?>" alt="<?php echo $this->htmlEscape($category->getName()) ?>" />
- <span><?php echo $category->getName() ?></span></a>
- </li>
- <?php endforeach; ?>
- </ul>
- <?php if($category->getThumbnail()): ?>
- <img id="slide-img-1" src="<?php echo $this->helper('catalog/image')->init($category, 'thumbnail')->resize(135, 135); ?>" /></a>
- <?php endif; ?>
- <?php if($category->getThumbnail()){ ?>
- <img id="slide-img-1" src="<?php echo $this->helper('catalog/image')->init($category, 'thumbnail')->resize(135, 135); ?>" /></a>
- <?php else: ?>
- <img id="slide-img-1" src="placeholderUri" /></a>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement