2014-12-04 67 views
0

嗨我去菜单页面显示并输入文本到浏览器页面标题字段,但Joomla 3.36 - 浏览器页面标题

它不会更改浏览器页面标题。

有没有人有任何想法可以造成这个问题?

+0

请在[堆栈的Joomla交易所]在问你的问题(http://joomla.stackexchange.com) – Lodder 2014-12-04 16:51:52

回答

0

我有这种情况最频繁发生与第三方组件。当您在菜单项中指定它们时,Joomla会存储这些值,但无论它们是否被使用,它都取决于组件。以下是我添加到模板覆盖的代码。如果您不知道如何覆盖模板输出,则应首先阅读How to override the output from the Joomla! core

将此代码放在模板覆盖文件中的任何其他HTML代码之前。它会检查是否指定显示页面标题,如果是,则会使用该标题,否则将使用菜单标题。

<?php if ($this->params->get('show_page_heading',1)) : ?> 
    <h1><?php echo $this->params->get('page_heading') ? $this->params->get('page_heading') : JFactory::getApplication()->getMenu()->getActive()->title; ?></h1> 
<?php endif; ?> 

要查看默认的Joomla是怎么做的,看看components\com_content\views\article\tmpl\default.php

<div class="item-page<?php echo $this->pageclass_sfx?>"> 
    <?php if ($this->params->get('show_page_heading', 1)) : ?> 
    <div class="page-header"> 
     <h1> <?php echo $this->escape($this->params->get('page_heading')); ?> </h1> 
    </div> 
    <?php endif; 
+0

谢谢您的帮助。原来,这是一个模板插件,造成了这个问题。 – TRLUK 2015-07-04 15:09:34