Magento Forum

   
Show image label instead of product name in media.phtml
 
bisk
Member
 
Avatar
Total Posts:  35
Joined:  2007-09-03
Les Pays-Bas
 

I like to show the image label, instead of the product name as alt and as a title below the product image. I have some problems fetching the image label (getLabel). Anyone know how to do this?

Thanks.

<?php $_product $this->getProduct() ?>
<?php 
if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>
<class="productimg" href="<?php echo $this->helper('catalog/image')->init($_product, 'image'); ?>"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'image')->resize(300); ?>" alt="<?php echo $this->htmlEscape($_product->getName()) ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>" /></a>

<
p id="imgtitle"><?php echo $this->htmlEscape($_product->getName()) ?></p>

....

 
Magento Community Magento Community
Magento Community
Magento Community
 
John R
Sr. Member
 
Total Posts:  90
Joined:  2008-08-21
 

The search feature is your friend:

http://www.magentocommerce.com/boards/viewthread/19617/

 
Magento Community Magento Community
Magento Community
Magento Community
 
bisk
Member
 
Avatar
Total Posts:  35
Joined:  2007-09-03
Les Pays-Bas
 

Thanks. I’ve tried the search though. I guess not with the right keywords…

But there’s not solution yet in that thread.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top