1
votes

For a part of my network with 4 similar websites (same code, but different layouts) I would like to create one application with 'Zend Framework 2' to control these 4 websites in one app. This application should take a look which domain is requested and render the right main layout and view layout for the requested website.

My thoughts about this is to write a plugin who set a variable for layout/view at the time when bootstrap is executed.

Is this right or is it better to do this in another way?

1

1 Answers

0
votes

I'd suggest that a plugin or a small module that listens to the dispatch or bootstrap events would serve you best. Rob Allen has a complete list of the ZF2 events in this post. Empirio Lab have a concise post with the relevant Module configuration on their site if you choose to go that way.