Preview Publishing Target – Enable Normal View For Non-Sitecore Users

Enabling normal view to non Sitecore users to review changes before publishing the actual changes to production site – preview publishing target

Sometimes, we got requirements from client that some of their executives will also required to review the site changes before publishing it to live site, and upon that those executives will be non Sitecore users. In this case we need to enable normal view mode for non Sitecore users so that they can review changes before reaching to final state of workflow to publish to public site.

Sitecore has introduced a feature called Preview Publishing Target which allows us to publish the items to that specific target ignoring in which state of workflow an item is.

Let’s create a Preview Publishing Target and enable normal view for the non Sitecore reviewers step by step:

  • Create a copy database of web. We have named it here preview_web.
  • Add connectionstring in App_Config/Connectionstrings.config with above specified name preview_web.
  • Add database node in App_Config/Sitecore.Config <databases> pointing to above database preview_web.
  • Add new publishing target to /sitecore/system/Publishing targets/
  • 1
  • Check Preview publishing target check-box as shown in above image
  • Publish this item to both the target web and preview_web.
  • Go to workflow used in your site -> select state -> select the preview publishing targets from the list as shown below:
  • 2
  • Do the same steps for all the necessary workflow states.
  • Publish the workflow with subitems.
  • Now accessing item which is using above workflow, you can see the note as shown below:
  • 3
  • Now add a new site in site definitions in ~/App_Config/Sitecore.Config
  • <site name="previewsite" hostName="scpreview" enableAnalytics="true" enableTracking="true" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content" startItem="/homepage" database="preview_web" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="50MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="25MB" filteredItemsCacheSize="10MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" cacheRenderingParameters="true" renderingParametersCacheSize="10MB" />
    
  • Add bindings and host entry for above demo host
  • Now, make changes, publish changes to both web and preview_web instances before submitting or approving in final workflow state, changes will be visible in the above preview site. While live site will remain unchanged.

Note:

Hope this will help you in implementing similar scenario.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s