简体   繁体   English

Joomla 3.3.4中的浏览器页面标题

[英]Browser page title in Joomla 3.3.4

i have got following problem with Joomla! 我和Joomla有以下问题! 3.3.4: after entering text to the Browser Page Title window in article options, the title doesn't change. 3.3.4:在文章选项中将文本输入浏览器页面标题窗口后,标题不会更改。 In that place is only displayed the global sitename. 在那个地方只显示全球网站名称。 In older Joomla everything works properly. 在年长的Joomla中一切正常。

To change the field title you need to edit the menu item options. 要更改字段标题,您需要编辑菜单项选项。 When you go to the detail view of menu item in question, navigate to the Page Display tab. 当您转到相关菜单项的详细视图时,请导航到“ 页面显示”选项卡。 The first field is Browser Page Title , enter the title you want to appear and save. 第一个字段是浏览器页面标题 ,输入要显示和保存的标题。

That should sort it out for you... 那应该为你解决...

Please try to switch to the default template and if it works there is something wrong with your template. 请尝试切换到默认模板,如果有效则模板出现问题。

In order to set browser title you could use setTitle() method. 要设置浏览器标题,您可以使用setTitle()方法。

<?php
  $this->setTitle( $title );
?>

You could check setTitle usage at: Joomla Docs . 您可以在以下位置检查setTitle用法: Joomla Docs

If you want to set title in article template you could make an addition to: 如果要在文章模板中设置标题,可以添加以下内容:

/templates/*template_name/html/article/default.php

An example code that could set the article title to browser title would be: 可以将文章标题设置为浏览器标题的示例代码是:

<?php
      $this->setTitle( $this->item->title );
?>

Hope this helps 希望这可以帮助

Go to Global Configuration -> Site -> Include Site Name in Page Titles and set it to Before or After . 转到Global Configuration - > Site - > Include Site Name in Page Titles并将其设置为BeforeAfter Of course you also have to set a Site Name . 当然,您还必须设置Site Name

图片澄清

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM