智能搜索Joomla一项结果 [英] Smart Search Joomla One Result

查看:114
本文介绍了智能搜索Joomla一项结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚启用了智能搜索插件,一切都很棒!

我只是想知道查询何时有一个结果,我很想Joomla!会将用户直接定向到此页面.

有人遇到这个问题并解决了吗?

解决方案

在此文件components\com_finder\views\search\view.html.php中,在显示功能内添加以下行.在此行之后-$this->assignRef('pagination', $pagination);

if(count($results)==1){
    $app->redirect($results[0]->path);
}

这是核心文件更改,因此如有必要,请执行此操作.

让我知道它是否不起作用.

I just enabled the Smart Search plug-in, and everything were great!

I just wanted to know when the query have ONE result, I'd love Joomla! will direct the user to this page directly.:(

Anyone has this issue and solved it ?

解决方案

In this file components\com_finder\views\search\view.html.php add the below line inside display function. After this line - $this->assignRef('pagination', $pagination);

if(count($results)==1){
    $app->redirect($results[0]->path);
}

This is a core file change so please do if necessary.

let me know if it does not work.

这篇关于智能搜索Joomla一项结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆