Answer the question
In order to leave comments, you need to log in
How to get the name of the current template in the plugin?
How to get the name of the current template in the plugin code.
simpler like
JFactory::getApplication()->getInstance()->getTemplate(TRUE);
$query = " SELECT template FROM #__template_styles WHERE home=1 AND client_id=0; ";
$template_name = JFactory::getDBO()->setQuery($query)->loadResult();
Answer the question
In order to leave comments, you need to log in
$app = JFactory::getApplication();
$template = $app->getTemplate(true);
echo $template->template;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question