PDA

View Full Version : Force Grid View in General Flatty Theme?



Maurizio Nicoli
June 17, 2014, 06:59 AM
Hi,

How do I show ads always in grid mode?

Thanks
Maurizio

Ionut Barabasa
June 17, 2014, 09:10 AM
Hello I am also interested in this. The solution posted for the old templates is not working in the responsive

Viktor
June 18, 2014, 03:21 AM
Hi,

Do you want to show Grid view by default or only grid view without any other?

Maurizio Nicoli
June 18, 2014, 07:44 AM
Hi Viktor,
only grid view without any other.

Thanks
Maurizio

Viktor
June 18, 2014, 11:05 AM
Hello Maurizio,

you can change something in files.
1. Open file: ftp://templates>>your_template>>tpl>>blocks>>grid_navbar.tpl

find code:



{if !$grid_mode}
{assign var='grid_mode' value='list'}
{/if}


and replace to:


{assign var='grid_mode' value='grid'}

below you should remove or commented code:



<div class="buttons">{strip}
{if $listing_type && !$listing_type.Photo}{else}
<div class="list{if $grid_mode == 'list'} active{/if}" title="{$lang.list_view}"><div><span></span><span></span><span></span><span></span><span></span><span></span></div></div>
{/if}
<div class="grid{if $grid_mode == 'grid'} active{/if}" title="{$lang.gallery_view}"><div><span></span><span></span><span></span><span></span></div></div>
<div class="map{if $grid_mode == 'map'} active{/if}" title="{$lang.map}"><div><span></span></div></div>
{/strip}</div>


save and close.

Then open file: ftp://templates>>your_template>>tpl>>blocks>>grid.tpl


find code:


{assign var='grid_mode' value=$smarty.cookies.grid_mode}
{if !$grid_mode}
{assign var='grid_mode' value='list'}
{/if}

{if $listing_type && !$listing_type.Photo}
{assign var='grid_mode' value='grid'}
{/if}

{if $periods}
{assign var='cur_date' value=false}
{assign var='grid_mode' value='list'}
{assign var='replace_patter' value=`$smarty.ldelim`day`$smarty.rdelim`}
{/if}


and replace to:



{assign var='grid_mode' value='grid'}
{if $periods}
{assign var='cur_date' value=false}
{assign var='grid_mode' value='list'}
{assign var='replace_patter' value=`$smarty.ldelim`day`$smarty.rdelim`}
{/if}


save and check again.

Maurizio Nicoli
June 19, 2014, 09:49 PM
Hi,

it works perfectly...

Thanks
maurizio

Abraham Adeyemi
May 5, 2015, 01:08 PM
What if I didn't want to get rid of the list view I just want the grid to show up first, how would i go about that please?

Viktor
May 6, 2015, 10:21 AM
Hello Abraham,

use this code:



{if !$grid_mode}
{assign var='grid_mode' value='grid'}
{/if}


save and check.

Abraham Adeyemi
May 6, 2015, 02:45 PM
Yeah it still displays them in list mode, I have cleared my cache and closed and reopened my browser but it's still displaying it in list view. I even switched the buttons around so that the grid view activator is the first one to show up, but it still is displaying list mode...

1276

Viktor
May 8, 2015, 03:27 AM
Hello Abraham,

If you want I can check on your site and solve if I will find it.

Abraham Adeyemi
May 8, 2015, 03:29 AM
No it's fixed now don't worry, thanks alot man :D

Juan Maya
December 15, 2016, 09:27 AM
Hello viktor I want to reopen this ticket, because it happens to me like Abraham Adeyemi.
http://www.screencast.com/t/P9QeaiI4B

Viktor
December 16, 2016, 09:28 AM
Hello Juan,

I think you should check files: ftp://templates>>your_template>>tpl>>blocks>>grid.tpl amd grid_navbar.tpl

Juan Maya
December 16, 2016, 02:14 PM
http://www.screencast.com/t/V6eLGe0ibVB
Does not work, what I'm looking for is that the grid is by default

Viktor
December 17, 2016, 12:31 PM
Hello Juan,

Yes I understand you. You should check files which I wrote above and variable: grid_mode
If you cannot send ftp access to my PM I will check it and solve.