PDA

View Full Version : 4 columns in grid



Petrache Nicolae
August 8, 2012, 09:30 PM
how can we change the number of columns in grid mode from 2 to 4? so 4 ads per line. thanks

Vladimir
August 9, 2012, 03:27 AM
Hello,

You can try fix it in the following way:

- open the file /templates/your_template/tpl/blocks/grid.tpl
- find following code:



{if $smarty.foreach.listingsF.iteration%2 == 0 && !$smarty.foreach.listingsF.last}


and change it to:



{if $smarty.foreach.listingsF.iteration%4 == 0 && !$smarty.foreach.listingsF.last}

Petrache Nicolae
August 9, 2012, 04:42 AM
hello,

you can try fix it in the following way:

- open the file /templates/your_template/tpl/blocks/grid.tpl
- find following code:



{if $smarty.foreach.listingsf.iteration%2 == 0 && !$smarty.foreach.listingsf.last}


and change it to:



{if $smarty.foreach.listingsf.iteration%4 == 0 && !$smarty.foreach.listingsf.last}


thank you. Works perfect

Petrache Nicolae
August 9, 2012, 04:50 PM
130130

any ideea how can we have the icons hidden and just on hover visible? thanks

Petrache Nicolae
October 2, 2012, 06:30 AM
Hello,

You can try fix it in the following way:

- open the file /templates/your_template/tpl/blocks/grid.tpl
- find following code:



{if $smarty.foreach.listingsF.iteration%2 == 0 && !$smarty.foreach.listingsF.last}


and change it to:



{if $smarty.foreach.listingsF.iteration%4 == 0 && !$smarty.foreach.listingsF.last}


how can we adjust lib.js to reflect the change. on page refresh, they show 4 per line but when we use the swith to go to list than grid view, we have it again as 2 instead of 4. thanks

Vladimir
October 2, 2012, 08:48 AM
how can we adjust lib.js to reflect the change. on page refresh, they show 4 per line but when we use the swith to go to list than grid view, we have it again as 2 instead of 4. thanks


Yes, we know it. You can try to fix it in file libs.js -> function transformToTable. Or would you please submit a ticket to our technical support.

Petrache Nicolae
October 2, 2012, 09:13 AM
Yes, we know it. You can try to fix it in file libs.js -> function transformToTable. Or would you please submit a ticket to our technical support.

work in that file is pretty tricky. viktor implemented for me a solution to have a diferent grid view list and all seemed ok but in the end it coused issues in other places like users accounts (switch/search). so i want to try a diferent aproach and change just the grid view to have it in 4 columns. i have adjusted the boxes contents but require this last issue to be fixed. since you presented the first solution for 4 columns i decided to ask if you ahev a solution to this as well...without messing up other areas. thanks