How would I list all brands and images on a CMS page? I am using an attribute named 'brands' and would like to call each one and display the image. I am using the following code to display on product page and it works great. All my brand images are located in /media/wysiwyg/brands/.
<div class="brandImage" <?php $_product = $this->getProduct(); $manufacturerName = $_product->getAttributeText('brands'); $manufacturerId = $_product->getManufacturer(); echo '<a href="/catalogsearch/result/?manufacturer='.$manufacturerId.'&q='.$manufacturerName.'">' ?> <img src="../media/wysiwyg/brands/<?php echo str_replace(' ', '-',strtolower($manufacturerName)); ?>.png" alt="<?php echo $manufacturerName; ?>" title="<?php echo $this->__('to see more from') ?> <?php echo $manufacturerName; ?> <?php echo $this->__('click here') ?>" /></a> </div>
I have also read that I should create a custom module, and used this page as an example, but can't figure out how to put the php code in.