A community in which webmasters can ask for help with topics such as PHP coding , MySQL , IT jobs, web design, IT security.
Current location:homephp forumphp talk in 2008 yearHow to get the path to the current template in Joomla 1.5? - page 1
User InfoPosts
How to get the path to the current template in Joomla 1.5?#1
I'm writing a component and would like to insert images from the template folder.

How do you get the correct path to the template folder?

posted date: 2008-12-18 17:59:00


Re: How to get the path to the current template in Joomla 1.5?#2
I had made out the solution of this problem. click to view my topic...

hope that hepls.

posted date: 2008-12-18 17:59:01


Re: How to get the path to the current template in Joomla 1.5?#3
I've figured out one method. Use the global $mainframe object.$templateDir = $mainframe->getBasePath() . "templates/" . $mainframe->getTemplate();Is there another (better) way?

posted date: 2008-12-18 18:11:00


Re: How to get the path to the current template in Joomla 1.5?#4
Looks to me as if this is the best way.

posted date: 2008-12-18 23:12:00


Re: How to get the path to the current template in Joomla 1.5?#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();

posted date: 2008-12-19 07:49:00


Re: How to get the path to the current template in Joomla 1.5?#6
What kind of path...On filesystem:$templateDir = JPATH_THEMES.DS.JFactory::getApplication()->getTemplate().DS;

posted date: 2009-03-22 21:10:00


Re: How to get the path to the current template in Joomla 1.5?#7
and how do you get the administrator template?

posted date: 2012-08-11 14:16:00


Re: How to get the path to the current template in Joomla 1.5?#8
@themhz same code should work if you're in the backend.

posted date: 2012-08-14 18:04:00


Re: How to get the path to the current template in Joomla 1.5?#9
tested and works in 3.x also.

posted date: 2014-06-08 17:21:00


Re: How to get the path to the current template in Joomla 1.5?#10
Thanks... worked like a charm :)

posted date: 2015-08-21 16:52:00


select page: « 1 »
Copyright ©2008-2017 www.momige.com, all rights reserved.