How to get the path to the current template in Joomla 1.5? How to get the path to the current template in Joomla 1.5? php php

How to get the path to the current template in Joomla 1.5?


IIRC, the $mainframe global object is eventually going away. Here is a way to do it through the framework:

$app = JFactory::getApplication();$templateDir = JURI::base() . 'templates/' . $app->getTemplate();


What kind of path...On filesystem:

$templateDir = JPATH_THEMES.DS.JFactory::getApplication()->getTemplate().DS;


I've figured out one method. Use the global $mainframe object.

$templateDir = $mainframe->getBasePath() . "templates/" . $mainframe->getTemplate();

Is there another (better) way?