- Posts: 30
- Thank you received: 0
OS Property support center
Advanced Search Page - remove options
- Gordon Lawson
- Topic Author
- Offline
- Junior Member
-
Less
More
7 years 1 month ago #110117
by Gordon Lawson
Advanced Search Page - remove options was created by Gordon Lawson
Hi,
On the advanced search page, is it possible to remove some of the options under "Sort By"?
Thanks
On the advanced search page, is it possible to remove some of the options under "Sort By"?
Thanks
Please Log in or Create an account to join the conversation.
- Nguyen Phu Quan
-
- Offline
- Banned
-
Less
More
- Posts: 13
- Thank you received: 2
7 years 1 month ago #110150
by Nguyen Phu Quan
Replied by Nguyen Phu Quan on topic Advanced Search Page - remove options
Dear Sir,
To remove some options in dropdown "Sort By" at Advance Search, please open file Root > compoents > com_osproperty > classes > listing.php. Find the code
$optionArr = array();
$optionArr[] = JHTML::_('select.option','a.isFeatured',JText::_('OS_FEATURED'));
$optionArr[] = JHTML::_('select.option','a.ref',JText::_('Ref'));
$optionArr[] = JHTML::_('select.option','a.pro_name',JText::_('OS_PROPERTY_TITLE'));
$optionArr[] = JHTML::_('select.option','a.id',JText::_('OS_LISTDATE'));
$optionArr[] = JHTML::_('select.option','a.modified',JText::_('OS_MODIFIED'));
$optionArr[] = JHTML::_('select.option','a.price',JText::_('OS_PRICE'));
if($configClass == 1){
if($configClass == 0){
$optionArr[] = JHTML::_('select.option','a.square_feet',JText::_('OS_SQUARE_FEET'));
}else{
$optionArr[] = JHTML::_('select.option','a.square_feet',JText::_('OS_SQUARE_METER'));
}
}
Example: You want to hide the option 'Price', please remove the code
$optionArr[] = JHTML::_('select.option','a.price',JText::_('OS_PRICE'));
Thank you
Quan
To remove some options in dropdown "Sort By" at Advance Search, please open file Root > compoents > com_osproperty > classes > listing.php. Find the code
$optionArr = array();
$optionArr[] = JHTML::_('select.option','a.isFeatured',JText::_('OS_FEATURED'));
$optionArr[] = JHTML::_('select.option','a.ref',JText::_('Ref'));
$optionArr[] = JHTML::_('select.option','a.pro_name',JText::_('OS_PROPERTY_TITLE'));
$optionArr[] = JHTML::_('select.option','a.id',JText::_('OS_LISTDATE'));
$optionArr[] = JHTML::_('select.option','a.modified',JText::_('OS_MODIFIED'));
$optionArr[] = JHTML::_('select.option','a.price',JText::_('OS_PRICE'));
if($configClass == 1){
if($configClass == 0){
$optionArr[] = JHTML::_('select.option','a.square_feet',JText::_('OS_SQUARE_FEET'));
}else{
$optionArr[] = JHTML::_('select.option','a.square_feet',JText::_('OS_SQUARE_METER'));
}
}
Example: You want to hide the option 'Price', please remove the code
$optionArr[] = JHTML::_('select.option','a.price',JText::_('OS_PRICE'));
Thank you
Quan
Please Log in or Create an account to join the conversation.
- Gordon Lawson
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 30
- Thank you received: 0
7 years 1 month ago #110232
by Gordon Lawson
Replied by Gordon Lawson on topic Advanced Search Page - remove options
Thanks for that. I have found this code:
$optionArr = array();
$optionArr[] = JHTML::_('select.option','a.isFeatured',JText::_('OS_FEATURED'));
if($configClass == 1){
$optionArr[] = JHTML::_('select.option','a.ref',JText::_('Ref'));
}
$optionArr[] = JHTML::_('select.option','a.pro_name',JText::_('OS_PROPERTY_TITLE'));
$optionArr[] = JHTML::_('select.option','a.id',JText::_('OS_LISTDATE'));
$optionArr[] = JHTML::_('select.option','a.modified',JText::_('OS_MODIFIED'));
$optionArr[] = JHTML::_('select.option','a.price',JText::_('OS_PRICE'));
if($configClass == 1){
if($configClass == 0){
$optionArr[] = JHTML::_('select.option','a.square_feet',JText::_('OS_SQUARE_FEET'));
}else{
$optionArr[] = JHTML::_('select.option','a.square_feet',JText::_('OS_SQUARE_METER'));
}
}
$lists = JHtml::_('select.genericlist',$optionArr,'sortby','class="input-medium"','value','text',$sortby);
All I want in the Sort By box is "List Date" & "Price". Do I remove the "If", etc. too to get rid of "Ref"? I tride this and the search function no longer worked!
$optionArr = array();
$optionArr[] = JHTML::_('select.option','a.isFeatured',JText::_('OS_FEATURED'));
if($configClass == 1){
$optionArr[] = JHTML::_('select.option','a.ref',JText::_('Ref'));
}
$optionArr[] = JHTML::_('select.option','a.pro_name',JText::_('OS_PROPERTY_TITLE'));
$optionArr[] = JHTML::_('select.option','a.id',JText::_('OS_LISTDATE'));
$optionArr[] = JHTML::_('select.option','a.modified',JText::_('OS_MODIFIED'));
$optionArr[] = JHTML::_('select.option','a.price',JText::_('OS_PRICE'));
if($configClass == 1){
if($configClass == 0){
$optionArr[] = JHTML::_('select.option','a.square_feet',JText::_('OS_SQUARE_FEET'));
}else{
$optionArr[] = JHTML::_('select.option','a.square_feet',JText::_('OS_SQUARE_METER'));
}
}
$lists = JHtml::_('select.genericlist',$optionArr,'sortby','class="input-medium"','value','text',$sortby);
All I want in the Sort By box is "List Date" & "Price". Do I remove the "If", etc. too to get rid of "Ref"? I tride this and the search function no longer worked!
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.