I am struggling with some web application which is quite big and messy.
There are several Domains that land on the server. domains can have a "channel" and every channel should use different templates for customized look and feel.
The decision which channel to use takes place in different parts of the code and is chaotic. for that reason I will refactor the mechanism and was wondering where the best place would be to fork the headers and footers of the template.
How should I pass the knowledge, which channel the system should use?
I have a MVC architecture and the V delivers the HTML to the client.
Pls. Ask questions in the comments if the question seems to broad, so I can go in necessary details.