I wanted to setup a website that pulls the data as well as the presentation details from the master database similar to viewing a site in the Preview interface.
I followed the steps mentioned in the http://firebreaksice.com/how-to-setup-a-sitecore-preview-site-to-review-content-before-publishing/ .
- Added the preview host to the existing IIS Sitecore instance
- Added entry in host file for new site.
- Added a new
<site> node to the Sitecore instance’s
- Set the new site to listen to the master database
Attributes on the new preview node :
- Load content from the master database:
- Set a
hostName to bind to:
- Don’t filter items which preserves some basic item restrictions:
- Enable workflow:
, there are a few pages wherein the content is being pulled from master database and on rest of the pages, data is being pulled from web db only.
Doing these changes
When we debug, we are getting Sitecore.Context.Database as master always, but the Sitecore.Context.Item from web db sometimes i.e. in some cases the item is from web and in other cases, item is from master.