Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

Multiple sites - Localhost - Best Practice

$
0
0

Hey,

I've been trying to setup multiple sites on a page I've been working on, and know how to make it work live, but not locally.

The main problem is how to solve it using best practice, as I would like the project to be as maintainable as possible for future support cases and whatnot.

The two sites are almost identical, but the 2nd site needs a new StartpageModel and probably a new ArticleModel, along with a new stylesheet. 
How I've solved this now is by adding a new model and calling it : StartPageClientName, as opposed to the old StartPage. 

This obviously generates a lot of code that's fairly similar, but still have some variations from eachother.

Now, after I've added all these new models/controllers and views, I go into /episerver/cms and add a new startpage of the new type.
Then i go to Admin->Manage Sites, and change the Startpage to the new one.

This means that the old site is unaccesible and most likely throws a 404 error

Once i go Live i will of course make two sites point to their own StartPage, and disable all the templates/models that the respective sites shouldn't be able to create.

Have i gone about this the correct way or should it be done differently? 

Any thoughts on the matter is very welcome :)


Viewing all articles
Browse latest Browse all 9076

Trending Articles