4 years 9 months ago - 4 years 8 months ago#3358by bram
Currently the component only allows a single value per menu level. If you have the color on level3 the request can either be q3=red OR q3=blue. A query like q3=(red OR blue) is not possible.
This feature is a long outstanding request.
version 3.1914 prepares for the possibility to modify the queries passed to mysql and therefore allowing a query like the one above.
Main question right now is how to pass multiple values in the url. You can pass arrays to a variable using q3=red&q3=blue however that gets pretty ugly and long.
for the SEF urls we need a delimiter, example.com/red+OR+blue would be possible. Main problem is that the delimter, ' OR ' in the example is never used in any field or title.
having a shorter delimiter as ',' or '|' would be nice, but those occur in titles and fields quite often.
currently the importer strips some special characters, that might confuse joomla/mysql/php/http one of them is the ';', so the semicolon is never present in any field or title and it can be used as delimiter:
Or the pipe '|' is added to the list of magically stripped characters, and the pipe can be used as delimiter
After parsing the value to the component a helper function will create the custom query in the case of the example it would translate to
(color='red' OR color='blue')
However if it is a date field you could translate it to