How to add extra text to the lt;titlegt; tag in Joomla(如何向 title 添加额外的文本Joomla 中的标签)
问题描述
我需要在 joomla 网站的标题标签中添加额外的文本(硬线).但我似乎无法在 Joomla 中找到该标签的位置.有大佬知道在哪里吗?汉克斯
I need to add extra text (Hard cord) to the title tag on a joomla website. But I cant seem to find where the tag is located in Joomla. Does any of you guys know where it is located? hanks
推荐答案
尝试将此添加到您的页面
Try adding this to your pages
<?php
if (@$_REQUEST['view'] != 'frontpage') {
$document =& JFactory::getDocument();
$document->setTitle("My Custom Text - ".$document->getTitle());
}
?>
或
<?php
if (@$_REQUEST['view'] != 'frontpage') {
$document =& JFactory::getDocument();
$document->setTitle($document->getTitle() . " - My Custom Text");
}
?>
或
<?php
if (@$_REQUEST['view'] != 'frontpage') {
$document =& JFactory::getDocument();
$document->setTitle("My Custom Text");
}
?>
如果您正在寻找类似于 joomla 中设置的不那么动态的东西,然后进入您的站点菜单,我认为在全局下,自从我使用 joomla 以来已经有一段时间了,其中一些应该有一个框来输入独特的标题将出现在所有页面上.
if your looking for something less dynamic that resembles a setting in joomla then go into your site menu, under global I think, its been a while since ive used joomla and some where within there there should be a box to type a unique title in that will be on all pages.
这篇关于如何向 <title> 添加额外的文本Joomla 中的标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何向 <title> 添加额外的文本Joomla 中的标签
基础教程推荐
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- 如何替换eregi() 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
