Using Theme to change logo

I have a site with multiple domains, e.g. www.abc.com and www.def.com

My goal is to show different logo and copyright statement in header and footer based on the request coming from which domain. The main contents should stay the same.

2862

logo.jpg

So I use theme to achieve this. It works. However, I need to copy all views files to each themes’ folder, which is hard to maintain. For example, if I modified a view file, I need to modify multiple times to apply to all themes.

But the difference between themes is just header and footer. Is there a way that I only need to write other views one time, and write multiple header and footer?

What is the right way to handle this situation? Do you have a better idea?

No, you don’t. Copy only the layout file to theme’s folder and keep all other views in protected/views. As Guide says:

thanks.

Why create different themes just to change a logo and copyright statement?

Surely you would be better saving this in the database such as:


tbl_domains

id: int

domain: varchar

logo_url: varchar

copyright_text: varchar

It would be trivial to determine the domain name, match it to a database entry and then render the appropriate content to the view.