23
A
回答
33
IIRC,$大型機全局對象最終會消失。這是一種方法,通過該框架來做到這一點:
$app = JFactory::getApplication();
$templateDir = JURI::base() . 'templates/' . $app->getTemplate();
3
我已經想出了一種方法。使用全局$ mainframe對象。
$templateDir = $mainframe->getBasePath() . "templates/" . $mainframe->getTemplate();
有沒有另一種(更好的)方法?
+0
看起來對我來說,就好像這是最好的方式。 – 2008-12-19 07:12:38
6
什麼樣的路徑? 在文件系統:
$templateDir = JPATH_THEMES.DS.JFactory::getApplication()->getTemplate().DS;
以及如何獲得管理員模板? – themis 2012-08-11 22:16:51