pbootcms英文站搜索页面包屑显示中文的怎么办?

2025-08-08 0 523

pbootcms英文站搜索页面包屑显示中文的怎么办?

修改内容

打开ppshomecontrollerSearchController.php文件

替换成下面代码

<?php

/**

* @copyright (C)2020-2099 Hnaoyun Inc.

* @author XingMeng

* @email hnxsh@foxmail.com

* @date 2020年3月8日

*  搜索控制器

*/

namespace apphomecontroller;

use coreasicController;

use coreasicUrl;

class SearchController extends Controller

{

protected $parser;

protected $htmldir;

public function __construct()

{

$this->parser = new ParserController();

$this->htmldir = $this->config(‘tpl_html_dir’) ? $this->config(‘tpl_html_dir’) . ‘/’ : ”;

}

// 内容搜索

public function index()

{

if (cookie(‘lg’) == ‘cn’) {

$searchtpl = request(‘searchtpl’);

if (! preg_match(‘/^[w]+.html$/’, $searchtpl)) {

$searchtpl = ‘search.html’;

}

$content = parent::parser($this->htmldir . $searchtpl); // 框架标签解析

$content = $this->parser->parserBefore($content); // CMS公共标签前置解析

$pagetitle = get(‘keyword’) ? get(‘keyword’) . ‘-‘ : ”;

$content = str_replace(‘{pboot:pagetitle}’, $this->config(‘search_title’) ?: $pagetitle . ‘搜索结果-{pboot:sitetitle}-{pboot:sitesubtitle}’, $content);

$content = $this->parser->parserPositionLabel($content, 0, ‘搜索’, Url::home(‘search’)); // CMS当前位置标签解析

$content = $this->parser->parserSpecialPageSortLabel($content, – 1, ‘搜索结果’, Url::home(‘search’)); // 解析分类标签

$content = $this->parser->parserSearchLabel($content); // 搜索结果标签

$content = $this->parser->parserAfter($content); // CMS公共标签后置解析

echo $content; // 搜索页面不缓存

exit();

} else {

$searchtpl = request(‘searchtpl’);

if (! preg_match(‘/^[w]+.html$/’, $searchtpl)) {

$searchtpl = ‘search.html’;

}

$content = parent::parser($this->htmldir . $searchtpl); // 框架标签解析

$content = $this->parser->parserBefore($content); // CMS公共标签前置解析

$pagetitle = get(‘keyword’) ? get(‘keyword’) . ‘-‘ : ”;

$content = str_replace(‘{pboot:pagetitle}’, $this->config(‘search_title’) ?: $pagetitle . ‘The search results-{pboot:sitetitle}-{pboot:sitesubtitle}’, $content);

$content = $this->parser->parserPositionLabel($content, 0, ‘Search’, Url::home(‘search’)); // CMS当前位置标签解析

$content = $this->parser->parserSpecialPageSortLabel($content, – 1, ‘The search results’, Url::home(‘search’)); // 解析分类标签

$content = $this->parser->parserSearchLabel($content); // 搜索结果标签

$content = $this->parser->parserAfter($content); // CMS公共标签后置解析

echo $content; // 搜索页面不缓存

exit();

}

}

}

效果

pbootcms英文站搜索页面包屑显示中文的怎么办?

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

版权声明:所有的源码、软件和资料,不得使用于非法商业用途,不得违反国家法律,一切关于该资源商业行为与本站无关。

影子cms pbootcms教程 pbootcms英文站搜索页面包屑显示中文的怎么办? https://www.yingzicms.com/338.html

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务