1

I am using Sitecore 9.0 without SXA.

I have an existing website (20-30 pages - mainly brochureware) for a certain brand and for a specific country. I now need to create another website with the same look & feel (same layout, renderings etc. etc.) for a second country. The idea is that the second contry uses everything exactly as it is but changes the copy/text and maybe some images. What is the best way to do this? Following are the options I have looked at:

1.) Let's say that in the content for the existing site, SiteA, is in /sitecore/content/.../CountryA. Make a copy of the content branch CountryA for SiteB in /sitecore/content/.../CountryB and add a site entry in the Sitecore config for SiteB. The problem with this is that all the DataSources have absolute paths ( e.g. /sitecore/content/.../CountryA/Home/ContentItem1) so most of the content is still coming from /sitecore/content/.../CountryA! This still seems like the easiest way.

2.) Relative data source path (as suggested in https://stackoverflow.com/questions/38823601/sitecore-set-a-relative-data-source-while-using-branch). This option does not seem to be available in Control Properties (accessed via content item presentation details).

3.) Branch template. This could help a bit but once you consider all the effort to create a branch template and then you still have to create all the content items - not sure if it is easier this way.

Any pointers / suggestions would be greatly appreciated.

Thanks!

  • One word. Alen Pelin's SmartCopy commands. Well ok, that was more than one word ;-) But it will allow you to duplicate your site in one snap, and have all the datasource references remapped. – Mark Cassidy May 14 '18 at 14:23
  • Alen Pelin's Smart Copy can be found in github.com/AlenPelin/Sitecore-Smart-Commands; thanks Mark – Sandeep May 17 '18 at 12:45
0

We do this quite often, with far larger sites. The sites run on the same templates and code. For sites with more variation, we've created a second set of templates that can be configured slightly differently, while still running on the same code.

Firstly, you need to know where your content is - including data sources. If you have a structure where Your data sources and pages are contained within a single folder, then this can be copied as a whole.

At that point, you'll need to script a solution to localize any links and references. You will be able to do this using a fairly simple path replacement, as each site will have the same relative structure. The easiest way to script this is to look up each item's entries in the link database. You will need to exclude all references that are external to the site folder (e.g. to rendering items)

You'll also have to decide if the media library for the site will be shared, replicated or partially shared (e.g. site 2 can use site 1 media, but can only add new media in its own part of the library).

Your relative data source for presentation components needs to be set on the Datasource Location field of the rendering item.

Lastly, you will also need to incorporate relative paths for any presentation components with a datasource that you include in standard values for a page.

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.