完善前台seo功能
This commit is contained in:
@@ -14,6 +14,10 @@ use \app\controller\Base as BaseC;
|
||||
|
||||
class Base extends BaseC {
|
||||
|
||||
protected function initialize(){
|
||||
|
||||
}
|
||||
|
||||
protected function fetch($template = '') {
|
||||
$config = Cache::get('system_config_data');
|
||||
$this->tpl_config['view_depr'] = '_';
|
||||
|
||||
@@ -44,6 +44,8 @@ class Content extends Base {
|
||||
'list' => $list,
|
||||
'page' => $list->render()
|
||||
];
|
||||
|
||||
$this->setSeo($this->modelInfo['title'] . '频道', $this->modelInfo['title'] . '频道', $this->modelInfo['title'] . '频道');
|
||||
return $this->fetch($teamplate);
|
||||
}
|
||||
|
||||
@@ -84,6 +86,7 @@ class Content extends Base {
|
||||
'list' => $list,
|
||||
'page' => $list->render()
|
||||
];
|
||||
$this->setSeo($cate['title'], $cate['title'], $cate['title']);
|
||||
return $this->fetch($teamplate);
|
||||
}
|
||||
|
||||
@@ -130,6 +133,7 @@ class Content extends Base {
|
||||
'prev' => $prev,
|
||||
'next' => $next
|
||||
];
|
||||
$this->setSeo($detail['title'], $detail['title'], $detail['title']);
|
||||
return $this->fetch($teamplate);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ class Index extends Base {
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public function index() {
|
||||
$this->setSeo("网站首页", '网站首页', '网站首页');
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user