如何向 <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.
相关文章