1、首页:站点标题-副标题
2、列表页:栏目标题-站点标题
3、详情页:文章标题-站点标题
4、单页:文章标题-站点标题
要实现这一目标,需要对 PbootCMS 的代码进行修改。具体操作如下:
打开文件 apps/home/controller/IndexController.php,找到列表页、详情页和单页的相关代码。
这些代码大概位于第 142 行、163 行和 189 行附近。接下来,分别对这三处代码进行修改。
// 列表页原代码
$content = str_replace('{pboot:pagetitle}', $pagetitle . '-{pboot:sitetitle}-{pboot:sitesubtitle}', $content);
// 修改后的代码
$content = str_replace('{pboot:pagetitle}', $pagetitle . '-{pboot:sitetitle}', $content);
// 详情页原代码
$content = str_replace('{pboot:pagetitle}', '{content:title}-{sort:name}-{pboot:sitesubtitle}', $content);
// 修改后的代码
$content = str_replace('{pboot:pagetitle}', '{content:title}-{pboot:sitetitle}', $content);
// 单页原代码
$content = str_replace('{pboot:pagetitle}', $pagetitle . '-{pboot:sitetitle}-{pboot:sitesubtitle}', $content);
// 修改后的代码
$content = str_replace('{pboot:pagetitle}', $pagetitle . '-{pboot:sitetitle}', $content);
希望这篇文章能帮助您更好地理解和使用 PbootCMS!如果您还有其他问题,请随时查阅相关文档或咨询社区支持。