1

This should be simple to achieve but since I'm a mage noob ((( I cant seem to get this to work.

I basically have category with all brands and what I'd like to do is to display brand names and links (without images) on the separate CMS page (brands).

Thanks.

1 Answer 1

4

Assuming the category you created has sub categories that are the brands, replace x with the id of your shop by brand category.

<?php    
    $brands = Mage::getModel('catalog/category')->load(x)->getChildrenCategories();
?>

<?php foreach($brands as $brand): ?>
    <ul>
    <li>
        <a href="<?php echo $brand->getUrl() ?>">
             <?php echo htmlspecialchars($brand->getName()) ?>
        </a>
    </li>
    </ul>
 <?php endforeach ?>   
4
  • I appreciate your reply, sorry but, as I mentioned I'm a mage noob. Do I need to create phtml with above code? if so where should I place it and how can I reference it from CMS???
    – lvekua
    Nov 8, 2012 at 21:19
  • 2
    ooh I got it to work. I have created new phtml file called brands.phtml and placed it in template/catalog/product then inside of the CMS page used: {{block type="catalog/product_list" name="blanco.catalog.category.view" alias="product_homepage" template="catalog/product/brands.phtml"}} thank you very much for your help.
    – lvekua
    Nov 8, 2012 at 21:54
  • Glad it worked. If I helped answer your question please mark it as answered & up vote. Cheers.
    – Tom
    Nov 8, 2012 at 22:35
  • I did try to rate, but unfortunately my reputation is less then 15 (((
    – lvekua
    Nov 8, 2012 at 23:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.