织梦模板DEDECMS通过ID搜索出对应文章结果的实现方法教程
很简单,我们可以通过aid=8420 直接搜索该id, 索引到相应文档内容
实现的办法:
打开include>arc.searchview.class.php
找到278行,$ks = explode(' ',$this->Keywords); 在其上面加入以下代码:
//new add
if(is_numeric($this->Keywords)){
return " arc.id={$this->Keywords}";
}
后台更新缓存,重新生成,即可。
|
|