Giorgi625 VIP
Total posts: 655
31 May 2016 11:20

Hello I need to add to Joomla search page possibility to choose to display featured or not featured records and tried to add checkbox, but can't figure out how to do this. I have only one section so I tried to change cobalt search plugins php file and on a place of section checkbox to add featured or not checkbox but it does not worked. Can someone recommend way how to do this?

Last Modified: 06 Jun 2016


Sergey
Total posts: 13,748
31 May 2016 12:01

Do you mean Joomla global search?

In any way in js_res_record table theer is featured field. When you select you have to add WHERE featured = 1 or 0.


Giorgi625 VIP
Total posts: 655
31 May 2016 16:02

Yes I know that I need to use SELECT of this table but I don't know where to use this select.


pepperstreet VIP
Total posts: 3,837
01 Jun 2016 02:05

@Sergey
BTW, shouldn't it be an option for advanced search and filters?
For instance a checkbox or toggle to filter for "is featured" or "featured only"


Sorry for going off-topic, but it also reminds me on filters for "rating" and "has image".


Giorgi625 VIP
Total posts: 655
01 Jun 2016 10:49

pepperstreet @Sergey

BTW, shouldn't it be an option for advanced search and filters?

For instance a checkbox or toggle to filter for "is featured" or "featured only"

Sorry for going off-topic, but it also reminds me on filters for "rating" and "has image".

I agree with you it will be good if to filter module will be added possibility to searched only featured and also function to search in ratings by range for example.


Sergey
Total posts: 13,748
05 Jun 2016 14:39

If we are talking about Joomla core search, not smart finder, there is no interface to add search options.


Giorgi625 VIP
Total posts: 655
05 Jun 2016 17:42

Sergey If we are talking about Joomla core search, not smart finder, there is no interface to add search options.

for ratings and images we are talking about Cobalt filter module, for featured I did it other way. jsut creted another section which is called featured so there is checkbox for this section in joomla standart search and it works as I wanted.


pepperstreet VIP
Total posts: 3,837
05 Jun 2016 18:37

Sergey If we are talking about Joomla core search ..., there is no interface to add search options.

Unfortunately.

As far as I know the global search was about to vanish entirely, and Finder/Smart-Search is the "new" and preferred method. But who knows... the Joomla PLT might change their mind tomorrow ;)


Alternative rough idea for an extra "Global Search" parameter: The Cobalt plugin could be extended with a backend parameter for "featured", but it would be one global option. No chance for the user to switch and toggle.
What about passing a variable e.g. "featured" from the search menuitem to the Cobalt plugin? Either the "Notes" field or maybe a custom field parameter, which could be added to an Alt-MenuItem with its own .XML file. The value could be used for an alterantive SQL query.


Sergey
Total posts: 13,748
06 Jun 2016 04:32

Giorgi625 for featured I did it other way. jsut creted another section which is called featured so there is checkbox for this section in joomla standart search and it works as I wanted.

SO you save featured articles in different section? How do you show all articles togather?


Giorgi625 VIP
Total posts: 655
06 Jun 2016 09:43

I don't have page where are displayed all records except Home, where I use Center collumn for displaying news and right collumn(approfondimento) for featured news Click here to link... and ther is only posibility to go to full record view. No list view On a search now I have two checkboxes and can search in a section which I want Click here to link...


Sackgesicht VIP
Total posts: 1,636
06 Jun 2016 10:12

@giorgi625 Small cosmetic issue: your search button has a small tooltip which goes out of the browser area ...

2016-06-06_18-15-37

Powered by Cobalt