joomla/joomla-platform — pull request #546 by elinw (2011-11-20 18:02:24+00:00)
Title: Allow application to set $options.

Sometimes an application would like to use a different folder name for templates or a second template, but currently this is not always possible, at least not simply when using JWeb. For example it is easy to create theme2 but to actually access it when it is in a folder that is not called themes is very complex. One way that should work is to be able to do something like this in the application:

$this->options = array(
'template' => $this->get('theme2'),
'file' => 'index.php',
'params' => '',
'directory' => 'templates',
);

However currently this will always be overwritten by the hard coded options in JWeb. This pull request simply adds checks for existing options before JWeb sets them.