- Posts: 9
- Thank you received: 0
OS Property support center
Default View: List View
- Johnny Norton
- Topic Author
- Offline
- New Member
-
Less
More
12 years 7 months ago #18513
by Johnny Norton
Default View: List View was created by Johnny Norton
Hi.
Is there a way to set the default view to list view instead of grid view? I actually don't need the grid view at all for this project.
Thanks
J.
Is there a way to set the default view to list view instead of grid view? I actually don't need the grid view at all for this project.
Thanks
J.
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13020
- Thank you received: 1688
12 years 7 months ago #18516
by Mr. Dam
Replied by Mr. Dam on topic Re: Default View: List View
Hi,
There are no configuration way to set the list view is default layout. But you can edit in the source code.
Please open file components > com_osproperty > classes > listing.php
Function : listProperties($option,$rows,$pageNav,$lists,$filterParams,$configs)
Find this code :
if($view_type_cookie == 1){
$body = $tpl->fetch("listing.html.tpl.php");
}elseif($view_type_cookie == 2){
$body = $tpl->fetch("map.html.tpl.php");
}else{
$body = $tpl->fetch("grid.html.tpl.php");
}
Replace by :
if($view_type_cookie == 3){
$body = $tpl->fetch("grid.html.tpl.php");
}elseif($view_type_cookie == 2){
$body = $tpl->fetch("map.html.tpl.php");
}else{
$body = $tpl->fetch("listing.html.tpl.php");
}
There are no configuration way to set the list view is default layout. But you can edit in the source code.
Please open file components > com_osproperty > classes > listing.php
Function : listProperties($option,$rows,$pageNav,$lists,$filterParams,$configs)
Find this code :
if($view_type_cookie == 1){
$body = $tpl->fetch("listing.html.tpl.php");
}elseif($view_type_cookie == 2){
$body = $tpl->fetch("map.html.tpl.php");
}else{
$body = $tpl->fetch("grid.html.tpl.php");
}
Replace by :
if($view_type_cookie == 3){
$body = $tpl->fetch("grid.html.tpl.php");
}elseif($view_type_cookie == 2){
$body = $tpl->fetch("map.html.tpl.php");
}else{
$body = $tpl->fetch("listing.html.tpl.php");
}
Please Log in or Create an account to join the conversation.
- kalesh.suby
- Offline
- Premium Member
-
Less
More
- Posts: 106
- Thank you received: 1
12 years 7 months ago #18531
by kalesh.suby
Replied by kalesh.suby on topic Re: Default View: List View
Instead of replacing the grid view, how to make the DEFAULT view as list view.
In other words, when property list page loads, the default view should be list view and not grid view.
Thanks
In other words, when property list page loads, the default view should be list view and not grid view.
Thanks
Please Log in or Create an account to join the conversation.
- Johnny Norton
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 9
- Thank you received: 0
12 years 7 months ago #18538
by Johnny Norton
Replied by Johnny Norton on topic Re: Default View: List View
Hi.
I couldn't find that code in listing.php but I did find a similar code in listing.html.php
I changed the code below and it seems to have worked.
Thanks.
}
if($view_type_cookie == 1){
$body = $tpl->fetch("listing.html.tpl.php");
}else{
$body = $tpl->fetch("grid.html.tpl.php");
}
echo $body;
}
}
if($view_type_cookie == 1){
$body = $tpl->fetch("grid.html.tpl.php");
}else{
$body = $tpl->fetch("listing.html.tpl.php");
}
echo $body;
}
I couldn't find that code in listing.php but I did find a similar code in listing.html.php
I changed the code below and it seems to have worked.
Thanks.
}
if($view_type_cookie == 1){
$body = $tpl->fetch("listing.html.tpl.php");
}else{
$body = $tpl->fetch("grid.html.tpl.php");
}
echo $body;
}
}
if($view_type_cookie == 1){
$body = $tpl->fetch("grid.html.tpl.php");
}else{
$body = $tpl->fetch("listing.html.tpl.php");
}
echo $body;
}
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13020
- Thank you received: 1688
12 years 7 months ago #18539
by Mr. Dam
Replied by Mr. Dam on topic Re: Default View: List View
Sorry, my fault. It's listing.html.php
You are great
Thanks
Dam
You are great

Thanks
Dam
Please Log in or Create an account to join the conversation.
Moderators: Mr. Dam, Nguyen Phu Quan
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.