VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: communion on August 02, 2012, 08:56:22 AM

Title: Alt Tags blank on Product Details Page
Post by: communion on August 02, 2012, 08:56:22 AM
Hi I've modified template for default_images.php like this:

<div class="main-image">
<?php echo $this->product->images[0]->displayMediaFull('class="medium-image" alt="'.$this->product->text.'" ',true,' title="'.$this->product->product_name.'" ',true,' rel="prettyPhoto[pp_gal]" id="medium-image"'false ); ?></div>


Right now my title is pulled in from the product, but the Alt tag (image description) shows up underneath the main image instead of populating the alt tag.

Can someone point me in the right direction?

Thanks
Title: Re: Alt Tags blank on Product Details Page
Post by: ivus on August 02, 2012, 09:10:36 AM
Hi communion,

That's because your code is badly formed.

<div class="main-image">
   <?php echo $this->product->images[0]->displayMediaFull('class="medium-image" alt="'.$this->product->text.'" ',true,' title="'.$this->product->product_name.'" ',true,' rel="prettyPhoto[pp_gal]" id="medium-image"', false ); ?>
</div>

the function has the following parameters:

function displayMediaFull($imageArgs='', $lightbox=true, $effect="class='modal'", $description = true ){}

not sure what you are trying to pass into it...

I hope this helps. ;D