We have a multi-site setup and have the following
sites defined in config:
<sites> <site name="mysite1" patch:before="*[@name='website']" rootPath="/sitecore/content/mysite1" startItem="home" hostName="mysite1.com" ... /> <site name="mysite2" patch:after="*[@name='mysite1']" rootPath="/sitecore/content/mysite2" startItem="home" hostName="mysite2.com" ... /> </sites>
When content editors log in to the admin interface (mysite1.com/sitecore), they are able to see all the content in the tree for both sites, due to the way the roles and permissions are set up. Some users are in multiple roles and therefore can see content for multiple sites. The problem, however, is when a user tries to edit content using the Experience Editor—for
mysite2, some elements of the site still refer to the logged-in site, e.g.
Investigating further, it seems that
Sitecore.Context.Site is set to
"mysite1" in the Experience Editor.
What is the best way to allow the user to edit both sites separately in the Experience Editor?