1

I am working on building a tool for multi-site implementation, right now when ever i am adding a new site i need to go and change the site definition file manually but i want to make it dynamically as it is done using SXA where Config files are getting updated dynamically when ever we are making any changes to site setting.

  • I have used this one in the past with success. marketplace.sitecore.net/en/Modules/D/… – Chris Auer Mar 18 '19 at 13:19
  • 1
    But changing a config file to manage the site definitions defeats the purpose placing these settings in items. Why not just have a script update these in the environment during deployment. – Michael West Mar 18 '19 at 13:33
2

SXA does have a really nice site manager. It holds all the site data in Sitecore items and does not require a app pool reset for the new site to be available.

For non-SXA sites, you have a few options:

Dynamic Site Manager

I have personal experience with this one. It allows you to create and edit site configs in Sitecore. When you publish a site config, it clears the cache for the sites manager and reloads the new list. When you create a site, it does not require an app_pool reset.

marketplace - https://marketplace.sitecore.net/en/Modules/D/Dynamic_Sites_Manager.aspx

github - https://github.com/Vapok/Sitecore.SharedSource.DynamicSites

website - https://sitecorehacker.com/modules/dynamic-sites-manager

Multiple Site Manager

marketplace - https://marketplace.sitecore.net/Modules/M/Multiple_Sites_Manager.aspx

github - https://github.com/JimmieOverby/MultipleSitesManager

PowerShell

Long term you are going to want to tie all your sites and your site creation together. The best way to do this is with Sitecore PowerShell Extensions. Like SXA which uses PowerShell to create its sites. You can pop form for the user to name the site, set the urls, cache levels, etc... Then you can create the site and the related item that holds all the site details for your site manager.

|improve this answer|||||
  • Hi Pete, Thanks for help but i don't want to use any module but i want to use it as custom one? can I achieve this by using custom events or pipeline processors? – vinay kumar singh Mar 19 '19 at 11:54
  • 1
    You are way better off using Pete's module than writing a custom event to update the sites.xml. Do you also know that every time you update the sites.xml file, the whole site has to reload (like an app pool reset). Also if you have more than one server, you have to make sure you write the file on each server. – Chris Auer Mar 19 '19 at 12:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.