diff --git a/Application/Admin/View/Site/media.html b/Application/Admin/View/Site/media.html index 6fcd1322c..949b46d19 100644 --- a/Application/Admin/View/Site/media.html +++ b/Application/Admin/View/Site/media.html @@ -10,7 +10,7 @@
说明:针对PC官网的显示进行基本配置
diff --git a/Application/Admin/Widget/IndexWidget.class.php b/Application/Admin/Widget/IndexWidget.class.php index 00a46b68e..59b351450 100644 --- a/Application/Admin/Widget/IndexWidget.class.php +++ b/Application/Admin/Widget/IndexWidget.class.php @@ -4,9 +4,13 @@ use Think\Controller; class IndexWidget extends Controller{ - public function navigation($value='',$compare='') + public function navigation($value='',$compare='',$title='') { - $mainID = M('Menu')->where("pid !=0 AND url like '%".$value."%'")->getField('id'); + $where = "pid !=0 AND url like '%".$value."%'"; + if ($title != '') { + $where .= ' AND title=\'' . $title . '\''; + } + $mainID = M('Menu')->where($where)->getField('id'); $MainMenu = M('Menu')->field("id,pid,title,url,status,hide")->where(array('pid'=>$mainID,'hide'=>0))->order("sort asc")->select(); $this->assign("data",$MainMenu); $compare = empty($compare)?CONTROLLER_NAME."/".ACTION_NAME:$compare;