Opencart信息页面的自定义标题

Opencart信息页面的自定义标题,opencart,Opencart,我试图在OpenCart中创建具有特定标题的自定义信息页面。我在header.php中使用了这段代码 if (!isset($this->request->get['route']) || (isset($this->request->get['route']) && ($this->request->get['route'] == 'information/information'))) { if (file_exist

我试图在OpenCart中创建具有特定标题的自定义信息页面。我在header.php中使用了这段代码

if (!isset($this->request->get['route']) 
    || (isset($this->request->get['route']) 
    && ($this->request->get['route'] == 'information/information')))  {
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/header_pro.tpl')) {
    $this->template = $this->config->get('config_template') . '/template/common/header_pro.tpl';
} else {
    $this->template = 'default/template/common/header_pro.tpl';
}} 

else {
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/header.tpl')) {
    $this->template = $this->config->get('config_template') . '/template/common/header.tpl';
} else {
    $this->template = 'default/template/common/header.tpl';
}
现在我要做的是只选择几个信息页面,我想将标题_pro.tpl分配给它们
有什么办法吗?我已经为此奋斗了一段时间,提前谢谢你

首先,由于您需要检查路线是否为
information/information
,因此必须将其设置为,因此您只需要此选项

if(isset($this->request->get['route']))
&&($this->request->get['route']=='information/information')){
现在还要检查具体的信息页面,只需记下它们的ID,并添加此条件

if(在数组中($this->request->get['information\u id',数组(1,2,3,45,49))){
//显示标题_pro.tpl
}
因此,要使其一次完成,就像:

if(isset($this->request->get['route']))
&&$this->request->get['route']=='information/information'
&&在数组中($this->request->get['information\u id',数组(1,2,3,45,49))){
如果(文件\u存在(DIR\u TEMPLATE.$this->config->get('config\u TEMPLATE')。/TEMPLATE/common/header\u pro.tpl')){
$this->template=$this->config->get('config_template')。/template/common/header_pro.tpl';
}否则{
$this->template='default/template/common/header_pro.tpl';
}
}否则{
如果(文件\u存在(DIR\u TEMPLATE.$this->config->get('config\u TEMPLATE')。/TEMPLATE/common/header.tpl')){
$this->template=$this->config->get('config_template')。/template/common/header.tpl';
}否则{
$this->template='default/template/common/header.tpl';
}
}