To answer your question faster, you can search our knowledgebase articles before submitting a ticket.
Knowledgebase
How to use custom query in property listing menu
Posted by on 24 February 2015 07:54 AM

For simple using, This query is not a SQL query. for example, for filter properties by listing type you can do this:

sf_selectlisting = 1
For multiple query you can separate it with bar(|):
sf_selectlisting = 1 | sf_selectlisting = 4

This query use AND condition.

sf_select is our structure to see more, you can go to this position and check all keyword: libraries/rpl/listing

Each file over there contain own query for generating SQL query.

Please follow this instruction:

  1. Create new file over here: libraries/rpl/listing
  2. Define a spacial keyword for your custom query, for example, custom_desc

New file created should be like this:
<?php
defined('_JEXEC') or die('Restricted access');// no direct access
if (substr($field,0,14)=='sf_custom_desc' && !$done_this)
{
    if($value!='')
    {
        $table_column = str_replace('sf_custom_desc','',$field);
        $query .= "p.`{$table_column}` LIKE '{$value}';
    }
    $done_this = true;
}

**************************************************

Remember: You can change the sample and example code, just remember to apply security options.

Now in property listing custom query you should enter following query:  sf_custom_descdescription_en_gb = if gte mso 9
For affect in guest and registered user, enter this for both of custom query.


Comments (0)