我在joomla 2.5中使用了自定义搜索模块,我需要在模块上的标题标签中添加额外的文本。但我似乎无法找到标签在Joomla中的位置。你们中的任何人是否知道它的位置以及如何覆盖页面标题?谢谢如何编辑页面<title>在Joomla 2.5中的标签
回答
@George威尔逊是接近,但$this
只会工作,取决于你在/
而是什么情况你可以在任何地方做一些简单的事情(尽管这应该是由组件或插件设置的,专门用于以某种方式改进全局页面标题的插件)。
JFactory::getDocument()->setTitle('Set your title here');
请注意,如果你在一个模块或其他地方设置它,其他的东西可以在代码后面出现,并覆盖它。
大卫是正确的,标题可能会被覆盖,取决于你把这个代码放在哪里。您可以通过使用插件并将其放在操作订单的末尾来解决该问题。这就是RSSEO如何正确更改页面标题的方式,但该组件可能比您尝试完成的要求多得多。 – 2013-02-15 12:17:57
title
标记不应该由模块设置 - 而是由页面上的组件设置。说了这么多,你可以做到这一点通过:
<?php
$app = JFactory::getApplication();
$this->setTitle('This is the title that you wish to place');
?>
链接here更多信息
所以不可能改变页面标题在模块上? – user991041 2013-02-14 12:42:27
您的意思是页面'
我想你想的:
public_html/libraries/joomla/document/html/renderer/head.php
看看,关于线102。您将能够控制一切... :-)
您错过了您路径中的“joomla”子目录。路径必须是'/ www/libraries/joomla/document/html/renderer/head.php' – 2014-01-21 16:27:55
我刚刚编辑过那个Victor。非常感谢... :-) – 2014-09-05 21:03:09
添加以下行:
JFactory::getDocument()->setTitle('Set your title here');
后
$app = JFactory::getApplication();
:
public_html/libraries/joomla/document/html/renderer/head.php
- 1. Joomla 2.5 - 编辑“| print |”图标标签
- 2. 如何编辑Joomla 2.5中的元标记
- 3. Joomla 2.5编辑器中的网站URL
- 4. 在joomla中创建新页面2.5
- 5. 如何编辑joomla网站中的标题标签
- 6. 如何在joomla 2.5中编辑“Powered by iCagenda”?
- 7. 如何在Joomla 2.5中添加样式到JCE编辑器?
- 8. Joomla 2.5分页
- 9. 调整前端编辑窗口joomla 2.5
- 10. Joomla 2.5+语言文件编辑器
- 11. 如何编辑Joomla!菜单?
- 12. 如何的Joomla 2.5
- 13. 如何的Joomla 2.5
- 14. 如何从joomla 2.5中删除H1标签?
- 15. 如何编辑joomla插件?
- 16. K2标签模块过滤器(Joomla 2.5)
- 17. joomla 2.5突然剥离标签
- 18. 如何在TEXY AJAX编辑器中使用<style>标签?
- 19. TYPO3:如何在RTE编辑器中允许<video>标签?
- 20. 如何在joomla 2.5中创建joomla用户组2.5
- 21. 如何在Joomla 2.5 Administrator编辑菜单项目页面中创建引用选择下拉菜单?
- 22. TinyMCE编辑器剥离了我在joomla中的html代码2.5
- 23. 加载页面标题在joomla 2.5内容
- 24. 如何编辑页面标签图像? OAuthException:(#300)
- 25. Joomla 2.5模块具有可编辑标题和内容
- 26. 如何在wordpress管理面板中编辑页面标题?
- 27. 如何在编辑页面自动填充rails中的form_form标签字段
- 28. Joomla 2.5页面加载速度极慢
- 29. Joomla 2.5查看当前页面
- 30. Joomla 2.5管理页面不会显示
你可以试试这个 - http://stackoverflow.com/questions/11731912/how-to-add-extra-text-to-the-title-tag-in-joomla – Irfan 2013-02-14 12:10:26