Thursday 28 July 2011

joomla virtuemart - where do I control the amount of categories per row that are displayed

change joomla virtuemart category page layout

This is likely to be my first blog on the subject of changing the category page as I've a few changes to make.

My first problem is - where do I control the amount of categories per row that are displayed

I found this post on the subject Joomla Virtuemart - categories per row displayed

Which states

shop.index.php file in administrator / components / com_virtuemart / html

around line 35 change the 3 (or in your case 4) to whatever you want to be displayed.
Code:
$iCol = 1;
$categories_per_row = 3;
$cellwidth = intval( 100 / $categories_per_row );
?>


This doesn't work for me though on my virtuemart 1.1.5 stable installation but it gives me a decent lead.

After searching for $categories_per_row in both virtuemart folders I found this solution:

open up components/com_virtuemart/themes/default/templates/common/categoryChildlist.tpl.php

on line 5 I found

$categories_per_row = 4;

and changed this to

$categories_per_row = 3;


And it works. :))

No comments: