最近网友想把PB详情页URL形式改成view/id.html的形式
方法如下:适用PBOOTCMS3.0.9版本,简单实现,可能会引起未知错误!概不负责!
在ParserController.php文件中找到parserLink方法
修改elseif ($page == 'content') 里面的链接生成语句改成
if ($contentfilename) {$link = Url::home('view/' . $contentfilename, true);}else{$link = Url::home('view/' . $id, true);}
然后在IndexController.php文件中大概132行左右添加一个判断
elseif (preg_match('/view/i', $path)) {// view/内容名称或ID$data = $this->model->getContent($contenturl);$iscontent = true;}
转载请注明: 织梦模板 » PbootCMS详情页改成view/id.html形式
标签: