Sitecore multisite setup

I created site A successfully in sitecore and turned to production, now I want to add another site B to the same instance of sitecore. I know how to do this, but I'm not sure how I can separate the code of two sites (layouts, controls, etc.) so that no one is dependent on others. Instead of combining both sites on one site. A project in visual studio, I was wondering if I can create a new project for site B, but still reuse the sitecore files that are in site project A? What I'm really trying to understand is best practices in the sitecore multi-tenant architecture. Any ideas? Note: Site A and Site B are completely different in all aspects, except for the fact that they must run on the same instance of sitecore.

+3
source share
2 answers

I recommend that you divide the resources of each site into folders in the file system:

/Website/
/Website/sites/
/Website/sites/SiteA  (<-- specific to SiteA)
/Website/sites/SiteB  (<-- specific to SiteA)
/Website/sites/Common (<-- shared across any sites)

At Sitecore, do the same for your presentation components.

- layouts
  - SiteA
  - SiteB
  - Common
  - Sublayouts
    - SiteA
    - SiteB
    - Common

And the same for templates:

Templates
  User Defined
    SiteA
    SiteB
    Common

Separately open the C # class libraries so that they are specific to each site and have a common project for hidden code (for example, utility code for any site, extension methods, auxiliary classes, etc.). Visual Studio Solution:

- WebApp
- SiteALib  (<- SiteA specific code)
- SiteBLib  (<- SiteB specific code)
- CommonLib (<- reusable code for any site)

As for sites in the content tree, separate them at the same level:

sitecore
  content
    SiteA  (<-- root item for SiteA)
      home (<-- start item for SiteA)
    SiteB  (<-- root item for SiteB)
      home (<-- start item for SiteB)
+3
source

I think the easiest solution would be to simply use layouts, sublayers, etc. for each site.

You probably have only two folders in the layouts folder:

layouts / SiteA layouts / SiteB

aspx ascx . Sitecore. DLL , ( DLL WebControls, ).

, .

, , : end.config.

, (, www.sitea.com/sitecore/content/Siteb.aspx), , .

URL- , , Sitecore URL-, editingsite (, edit.mysites.com). , www.sitea.com/sitecore URL- www.sitea.com, Sitecore "" URL-, .

0

All Articles