I created site A successfully in sitecore and has deployed to production, now I want to add another site B to the same sitecore instance. I am aware of how to do this, but I am not sure how I can separate the two sites’ code (layouts, controls etc.) so that one is not truly dependent on other. Instead of combining both the sites in the same site A project in visual studio, I was wondering if I can create a new project for site B but still reuse sitecore files that are in site A’s project? What I am trying to understand really is the best practices in architecting multisite solutions in sitecore. Any ideas?
Note: site A and site B are totally different in every aspect except the fact that they need to run on same sitecore instance.
I created site A successfully in sitecore and has deployed to production, now I
Share
I recommend you separate each site’s assets into folders on the file system:
In Sitecore, do the same for your presentation components.
And the same for templates:
Separate out C# class libraries too so they’re specific to each site and have a common project for hared code (e.g. utility code for any site, extension methods, helper classes, etc). Visual Studio solution:
As for the sites in the content tree, separate them out too at the same level: