Possible to show only title in ajax search ?
- lusidjudjeto
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
7 years 1 month ago #7900
by lusidjudjeto
I'd like to make some changes so in ajax search in search results to show only the title of the article without category and without article content. Is that possible?
Please Log in or Create an account to join the conversation.
- Saka
- Offline
- Administrator
7 years 2 weeks ago #7913
by Saka
Emir Sakic
www.sakic.net
Yes. It gets the layout from the regular search component so if you change it's layout in template overrides it will reflect on AJAX Search.
Emir Sakic
www.sakic.net
Please Log in or Create an account to join the conversation.
- lusidjudjeto
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
7 years 2 weeks ago #7919
by lusidjudjeto
Can you point which file exactly should I edit and in which directory?
I try in components/com_search/views/search/tmpl/default_results.php but nothing is changed
I try in components/com_search/views/search/tmpl/default_results.php but nothing is changed
Please Log in or Create an account to join the conversation.
- Saka
- Offline
- Administrator
6 years 11 months ago #7927
by Saka
Emir Sakic
www.sakic.net
That's the file, you should not edit the core files so instead you should copy this file to templates/{yourtemplate}/html/com_search/search/default_results.php and edit there.
However, if you changed the core file and it doesn't have any effect then you may be using a custom template framework which has its own overrides. In that case you should consult your template provider to see where is the override for search component.
However, if you changed the core file and it doesn't have any effect then you may be using a custom template framework which has its own overrides. In that case you should consult your template provider to see where is the override for search component.
Emir Sakic
www.sakic.net
Please Log in or Create an account to join the conversation.
- dcary
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
6 years 8 months ago #7943
by dcary
Is there a way to not search content, and only search article titles in specific category?
Please Log in or Create an account to join the conversation.
- Saka
- Offline
- Administrator
6 years 8 months ago - 6 years 8 months ago #7944
by Saka
Emir Sakic
www.sakic.net
So, the module does not have its own search, it uses whatever you use for search on your site. By default it's Joomla search component and it's Search - Content plugin. This plugin is coded so it searches the title AND the content, but it's easy to modify it and comment out the content part in the query (file plugins/search/content/content.php). Even better, you should create a duplicate of this plugin, install it and publish it instead so you don't modify the core file and so the next Joomla update does not overwrite your changes. There you could also add some code to restrict the search to certain categories. Either way, some coding is required.
Emir Sakic
www.sakic.net
Last Edit: 6 years 8 months ago by Saka.
Please Log in or Create an account to join the conversation.