[Solar-talk] help with new dir structure
Rodrigo Moraes
rodrigo.moraes at gmail.com
Mon Mar 10 07:29:22 CDT 2008
On Mon, Mar 10, 2008 at 9:08 AM, Jeff Surgeson wrote:
> My problem is this:
> If I try and use the Vendor_App_News application class in Site1, as it is
> extended from Vendor_App_Base and not Site1_App_Base it loads the
> Vendor_App_Base_Layout templates and not Site1_App_Base_Layout templates.
Hi Jeff,
Try something like this. In Vendor_App_Base, add a config key
'template_path', and then add that path in _setLayoutTemplate():
protected function _setLayoutTemplates()
{
parent::_setLayoutTemplates();
// done, add the stack
$this->_view_object->addTemplatePath($this->_config['template_path']);
}
Then configure Site1/Site2 to set different paths.
For Site1:
$config['Vendor_App_Base']['template_path'] =
array('Site1/App/Base/Layout');
For Site2:
$config['Vendor_App_Base']['template_path'] =
array('Site2/App/Base/Layout');
I'm not sure this exactly will work or if it is the simplest way, but
it can give you a clue on how to get the flexibility you want. :)
-- rodrigo
More information about the Solar-talk
mailing list