New answers tagged templates
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
Related Tags
templates × 295joomla-3.x × 115
css × 36
module × 19
template-override × 19
php × 17
joomla-2.5 × 15
overrides × 13
development × 12
joomla-3.4 × 11
extensions × 11
component × 10
menu × 10
articles × 9
menu-item × 9
layout × 9
joomla-3.5 × 8
helix3 × 8
positions × 8
joomla-3.3.x × 7
t3-framework × 7
javascript × 6
administrator × 6
template-framework × 6
plugin × 5