joomla - 如何在 Joomla 2.5 文章页面中获取 base_url() ?

标签 joomla joomla2.5

我想在 Joomla(2.5) 文章页面中链接 pdf 文件。 该 pdf 文件位于

PROJECT_NAME/pdf/filename 目录。

是否有任何解决方案,我不需要静态编写整个路径,或者我可以说是否有任何方法可以在文章中获取base_url?

同样,我还需要链接文章文本中的一些菜单项。

最佳答案

JURI::base() 看起来像您要查找的命令。

Documentation here

注意:

In a template you can use the shortcut $this->baseurl instead of JURI::base( true ).

关于joomla - 如何在 Joomla 2.5 文章页面中获取 base_url() ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24532501/

相关文章:

php - 如何通过 PHP 更改 Joomla 管理员 URL - 无插件

joomla - jomsocial 团体和事件整合

mysql - Joomla 2.5 连接 3 个表

http - 乔姆拉!错误的 BASE HREF 将 HTTP 更改为 HTTPS

Joomla 注册表字段排序

php - 在 MySQL 中的两列中搜索一个值

javascript - 引用错误: Galleria is not defined

使用 Joomla 的 Wordpress 博客?

joomla - 如何获取 Joomla K2 项目作为类别页面上的对象?

Joomla获取菜单项id