New answers tagged

2

You can get it from template field in the form. if ($this->form) { $template = $this->form->getValue('template'); }


1

Yea, like I've explained above this worked for me: $id = Uri::getInstance()->getVar('id'); $query = Factory::getDbo()->setQuery("SELECT `template`, `params` FROM `#__template_styles` where `id` = '" . $id . "'"); $templateObject = $query->loadObject(); // usage // get template name $template = $templateObject->template; // ...


0

the issue was that i used the variable $module in my modules template for something else. i had overwritten the original $module, dumb mistake...


0

The only thing I could think of is just to check the XML file: $templatesPath = ((int) $this->template->client_id === 1 ? JPATH_ADMINISTRATOR : JPATH_SITE) . '/templates/'; $templateDetails = $templatesPath . $this->template->name . '/templateDetails.xml'; $templateXML = simplexml_load_file($templateDetails); if ($templateXML->namespace === ...


Top 50 recent answers are included