Just like using tmpl=component in a URL, I would like to change the tmpl= in a system plugin.

This, of course, does nothing:

$app = JFactory::getApplication();
$app->setTemplate('component', null);

1 Answer 1


If you want to mimic something being set from the URL, you should push it into JInput:

$jinput = JFactory::getApplication()->input;
$jinput->set('tmpl', 'component');

All code that runs after your plugin will see tmpl=component.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.