When I originally built my website, it was handling only one interface, but now I need to handle many interfaces.
I can detect which site to send for each request and isolate each site from the others, but all the sites have the same views.
Is there a way that I can render different views from the same controller?
I’m thinking something like:
application
controller
model
site_1_view
site_2_view
Is this possible?
It was very simple – I found that I could set the view base path in my constructor:
So in
public/index.php, I detect the URL, set it in the session, detect the name from my DB, then use the name to set the base path:So the application structure is now: