如何向< title>添加额外文字标签在Joomla [英] How to add extra text to the <title> tag in Joomla
本文介绍了如何向< title>添加额外文字标签在Joomla的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在joomla网站的标题标签上添加额外的文字(硬编码)。但我似乎无法找到标签在Joomla中的位置。你们有没有人知道它的位置? hanks
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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文