VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: micropalla on June 28, 2013, 08:15:30 AM

Title: Thumbnails alignment
Post by: micropalla on June 28, 2013, 08:15:30 AM
Hello.
Is there a way to align everything and to avoid this up and down effect?
I would like to align everything including button even if thumbs is higher or description is longer...
Can you help me?

Mod edit:  impatient bump message removed.  http://forum.virtuemart.net/index.php?board=114.0

[attachment cleanup by admin]
Title: Re: Thumbnails alignment
Post by: K&K media production on July 04, 2013, 14:47:40 PM
You can use a template override and css or JavaScript
Title: Re: Thumbnails alignment
Post by: zainabubu on November 26, 2013, 01:46:56 AM
how can that be done please?
Title: Re: Thumbnails alignment
Post by: GJC Web Design on November 26, 2013, 09:26:10 AM
Why not edit your images to make them at least all the same ratio - problem solved - otherwise you need to recode a template to fix a problem that you created...
Title: Re: Thumbnails alignment
Post by: zainabubu on November 28, 2013, 18:15:31 PM
for over 4 thousand images already online? That's a pretty tall order. Recode template, how so?
Title: Re: Thumbnails alignment
Post by: Spiros Petrakis on November 28, 2013, 19:56:14 PM
Quote from: zainabubu on November 28, 2013, 18:15:31 PM
Recode template, how so?

I assume that you referring to category layout so a quick fix would be to force a min-height for the link tag that surrounds the image. First find what is the height of the biggest thumb and do the following:

In default.php file of category view ( in components/com_virtuemart/views/category/tmpl folder ) replace line 232
<a title="<?php echo $product->product_name ?>" rel="vm-additional-images" href="<?php echo $product->link?>">

with this

<a title="<?php echo $product->product_name ?>" rel="vm-additional-images" href="<?php echo $product->link?>" style="min-height: 100px; display: block; >

in the above example replace 100px with your preferred height in px .

I suggest to create a template override for this file so it won't be overwritten by future Virtuemart updates.   More informations on template overrides here http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core