How to Improve Search Results Page in Joomla 3.4 - JoomShaper

How to Improve Search Results Page in Joomla 3.4

25 June 2015
Hits 25,811
6 min read

Beside website navigation, especially in large websites, search option is and always was very important part. Since many years Joomla improved many aspects of its core, but only adding Smart Search was the really big step move ahead. But many users still have question: How to improve searching in Joomla or How to improve search result page. I will try to answer to those customization question in current blog post.

Things You Need to Know

It is no secret that the standard search within Joomla 3.4+ still not have best appearance, normal user cannot control all available options, in particular, if site developer wants to hide something. Different Joomla 3 Templates feature different template files. Some include a override template file, which displays the search results. But in most cases they just add some extra CSS class, but final page still looks this same. And most people (clients) ask about how to hide specific elements.

Improving a Search Results Page

 search-joomla34-default

 I think you, like me, do not need all those searching filters. Let's hide some of them in Joomla 3.4. To create your own custom Search Page, based on default search component, you will need to create a Page template to include your search form and the information you want your users to see. Of course we do not suggest to edit Joomla core files, we use override system instead.

First, check if your current using template have such a folders inside: YourTemplateName\html\com_search\search  - if not, please create all of them.

Second, now you have to copy two files from \components\com_search\views\search\tmpl into new folder which you created a few second ago. I think coping even only "default_form.php"  file will help you customize result page. Inside that file you will find all filters, inluding: "Search for" and "Serach only".

search-code-in-joomla

Now you can using your basic HTML knownledge remove those parts which you do not need, whithout worries they will appear again after next Joomla 3.4+ update, it's fully safe. For my purposes I removed all those elements, also with Display Num. From the bottom section of code I left only Page counter which maybe useful, when Joomla will show more than 20 result items.

search3

Now search result is clean. But one "small" but importnat in my opinion element is missing I guess.

Highlight Search Terms

Highlight Search Terms does not come the default Joomla templates. I think that adding distinctive color for searching phrase will help users to find out in what context search term appears in the sentence on search results page. This part is very easy to do alone, all you have to do is add a extra CSS line into your template style file. In most cases those phrases wil get "hightlight" :

<span class="highlight">Joomla</span>

You can easy change font color or/and add background color or add underline, what you decide to do. Just use simple style, for example:

span.highlight {background: #9BCC56; color: #fff; padding:0 3px;}

Here is the final result:

search4

Of course use your own colors, style effects etc. I hope that quick tip helped you get a customized search result a little bit more than before.

Zero Results Found Page - How to reduce those cases

Probably your site do not have all topics and also people made mistakes in search bar. And as a result Joomla will present a prominent message indicating that nothing was found. However, there are ways to enhance even these pages with some useful information. First, if your website is fully based on English language you can use Smart Search instead of default, which better index content of site and may help improve search results or even during typing a words in search module.

Second idea, you can use search module based on Ajax Live Search, which can be used to create more user-friendly and interactive searches. When someone starts to type with the search field they will be presented with a drop-down box offering suggestions. Live search has many benefits compared to traditional searching, one of them is, of course, reducing a zero page results. On Joomla! Extension Directory you should find at least few of those modules, also free versions.

Third, you can replace the default Joomla Search Engine with something else, for example Google. The default code that Google gives you generates search results on the same page or frame. The downside to this is that if you placed the search box on your sidebar, search results would be displayed there too. Thankfully, it is very easy to display search results on a dedicated page. Also for this kind of search you will find ready modules. But remember about one fault of this method Joomla do not automatically sends notifications to Google with every new article and page update. So the Google search engines need time for index of whole content. It may take few weeks or more for search engines to revisit your site/blog and discover new content.

Four, if you site have PDF, RTF, DOC, XLS, ODT and others documents inside you can also make then search-able using addcional extension. JiFile (isapp.it) was designed to obtain an integrated tool in Joomla 3.x that allows the indexing of textual content of a document and research into them.

Search only here... 

Sometimes in result page you don't want to show all results from whole website, especially where some content should be protected/hidden from guests. In that case you can use free plugin  Improved Content Search  (offlajn.com)  which replace the default Joomla content search plugin with this extension, and you will get much more functionalities. You will be able to select the mode for category inclusion/exclusion, article inclusion/exclusion or limit for the search results.

search-index

 

Some people like Joomla search functionality, others needs improvements. If you fall into the latter group, I recommend you try one of the solutions detailed in this article, making for our clients easier to find the information presented on your web page.

 

 

 

Sign up for our newsletter

Don’t miss any updates of our new templates and extensions and all the astonishing offers we bring for you.