Saturday, November 24, 2018

Multisites Configuration in sitecore


 Hi friends, here i come to tell about how to configure a each site when you are working in a multisite environment.

let's Move,

Default sitecore sites configuration is found in /App_config/Sitedefinion.config under <site> node.

Incase if it’s not found ,then copy from /App_config/Include/Example/Sitedefinition.config.example file and rename this file to Sitedefinion.config. 

Steps to add a new site

New sites can be added in this section if you are working with multisite implementation with some individual properties

Step 1: It’s simple. Add new <site> node with some properties.for ex
              Sitename =>sitename
              StartPath  => Content start path ie: start item of your site.
              Default language => default language used in you site
              Cache settings => specify cache details

please see the below image (image shows how sites configured in sitecore)



Sites and the API

  • The Sitecore.Context class is a static class containing information about the current HTTP Request and your sitecore installation.
  • The Homepage and start item for your site is defined in Sitecore.config. It is a combination of rootPath and startItem attributes of the <site> node.


Some of the examples of API

  1. Sitecore.Context.User  => Current User
  2. Sitecore.Context.Database  => Current Database
  3. Sitecore.Context.Language => Current Language
  4. Sitecore.Context.Site.StartPath ==>Content start path


I Hope now you clear about this post and also don't forget to share with your friends.Happy Coding :)

No comments:

Post a Comment

Check the users Logged into the sitecore backend

Hi, Today I'm going to discuss about " how to check the concurrent users logged into the sitecore backend ? ". For this ...