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);
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