PDA

View Full Version : Force List View in Realty Theme?



Akhtar Siddiqui
January 24, 2014, 10:23 AM
Is this possible? Default seems to be gallery view.

For example if you do a search on the main page here http://bit.ly/LPruoS such as London, it will go and search results in gallery view. We need to change this to list view for all users.

Thanks

Mike
January 24, 2014, 11:23 AM
try to do following

open includes/controllers/listing_type.inc.php

and in the beggining of file add code



if( !$_COOKIE['grid_mode'] )
{
$_COOKIE['grid_mode'] = 'list';
}

Akhtar Siddiqui
January 27, 2014, 10:26 AM
Thanks Mike,

But that didn't work. Once you click on List View it sets a cookie and displays list view on that browser. However on a new computer without a cookie set, it always shows gallery view first until changed.


Also, do you know where I can modify the sort links in "Sort listings by".. As some of them do not make sense for our website.

Viktor
January 27, 2014, 10:51 AM
Hello Akhtar,

I think you you add Mike's condition in the beggining of file file search.inc.php too.
And remove cookies from your browser and then check again.

Mike
January 27, 2014, 11:57 AM
Strange why, are you sure you copied code ? I have checked again and it did the trick for me.

ALso you may pm me details to check.

Mike
January 27, 2014, 12:01 PM
Thanks Mike,
Also, do you know where I can modify the sort links in "Sort listings by".. As some of them do not make sense for our website.

On Browse pages Sort listings by the same as Short Form fields

For Search pages sorting fields are quick form fields, if you want to modify there is only way to modify this in code.

you have to find $sorting array and unset not necessary fields like below



unset($sorting['price']);
$rlSmarty -> assign_by_ref( 'sorting', $sorting );

Akhtar Siddiqui
January 28, 2014, 10:25 AM
Strange why, are you sure you copied code ? I have checked again and it did the trick for me.

ALso you may pm me details to check.

What Viktor said worked for us Mike. Left the code in both files anyway. Thanks.



On Browse pages Sort listings by the same as Short Form fields

For Search pages sorting fields are quick form fields, if you want to modify there is only way to modify this in code.

you have to find $sorting array and unset not necessary fields like below



unset($sorting['price']);
$rlSmarty -> assign_by_ref( 'sorting', $sorting );


What file can I find this in? Thanks