Search code examples
sitecoresitecore8sitecore-mvc

Create a new Sitecore website based on an existing website


My organization recently launched a new Sitecore website for a brand new product offering; let's call this website A. Website A was built by an external Sitecore vendor. They now want to rebuild one of their old websites (website B) using the templates of website A. They want website B to have the same functionality as Website A with only minor styling changes and a couple of new pages.

We are trying to do this project internally and we have a web team that is relatively new to sitecore (about 6 months of dev experience). I am looking for some guidance on how to approach this project and will appreciate any feedback and suggestions.

Do we start with an exact copy of Website A in a new instance of Sitecore for Website B? It would be great if we could rename all references of Website A in the templates, items, code, etc to Website B.


Solution

  • You could start by copying the content node of website A and then renaming it for website B in the same instance -then you'll have new content based on the same templates/layouts as website A. If there are styling changes you'd probably need a new layout for website B to pull in different styles.

    However things to watch out for:

    Data sources - any renderings in the site will likely have data sources. if these reference items in site A these will need to be repointed relative to site B. If there are a lot of these you could run a Sitecore Powershell script to do that.

    Data source Locations - these will be set up on each rendering and if the renderings are used in each site they have to work relatively - https://jermdavis.wordpress.com/2014/02/21/improving-your-sitecore-ia-with-relative-datasource-locations/

    Divergence - you need to be sure that templates/renderings will not divurge for each site, as soon as you start changing the template/renderings for a feature in one of the sites this going to have an impact on the other- this could get messy. You may then have to refactor by moving some templates/renderings into a common folder and then have site specific folders for templates.

    The safest way would be to copy the templates/layouts from site A and then go through the content of site B and change its templates and renderings to the new ones. This way the two sites have the ability to divurge if they need to.

    Duplication of items - You may want to think about the content architecture, will the two sites share data? If so it might make sense to move content out to a global folder outside of the node of each site otherwise you could end up duplicating data

    Standard Values - these are the default set ups for templates. It sounds like you'll need to change the layout for site B to account for the styling changes. This means that standard values will have to be different for each page-based item in each site, so you'll almost certainly need new Template to account for this.

    To summarise: it sounds easy to do a copy and paste job but long term you might run in to difficulties. It's far better to account for any divergence in the future by copying templates where necessary and taking a good look at what items can be shared between the sites.