Directly to the article [Articles Good Search module]

Please Log in or Create an account to join the conversation.

#
In my site every extra field is linked to a single article only, is it possible that when the user performs the search he goes directly to the article without the search results being shown? (sorry for my bad english)

Please Log in or Create an account to join the conversation.

#
Hello, Roberto.

Yes, it is possible with custom search results template file gsearch_blog.php

You can place the following code under <?php foreach($items as $items_counter => $item) {
After $item->catslug = $item->category_alias...
if(count($items) == 1) {
	header("Location: " . JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language)));
}

And if you use Ajax search, you need to modify module's ajax_search.php template file.
After the code - success: function(response) {
Add the following:
if(jQuery(response).find(".item-title").length == 1) {
	window.location.href = jQuery(response).find(".item-title a").attr("href");
}

Please Log in or Create an account to join the conversation.

#
It will be deleted with joomla update or module update?

Please Log in or Create an account to join the conversation.

#
No, you can create template override for each type. Then, it will be saved.

Module template:
  • You can select template in "Module template" parameter;
  • You can override default templates by copy and rename template folder here - templates/your_site_template/html/mod_articles_good_search/
    E.g. copy this folder - modules/mod_articles_good_search/tmpl/Default
    To this: - templates/your_site_template/html/mod_articles_good_search/my-template
    Then, select 'my-template' in the module parameters

Search results template:
  • You can adjust search results template in "Search results template parameters" section;
  • Template files located here - plugins/system/plg_articles_good_search/template/com_content/
  • Search results template files can be overrided in this folder - /templates/your_template/html/com_content/ (need to copy all template files).

Please Log in or Create an account to join the conversation.

#
Thank You!