2

I have a content item in the CMS, which is like an admin page for content authors. This item should never go to the web database, but authors should be able to use it by the preview mode.

When I set the Lifetime to an older date or Never Publish settings for this item, and try to preview it, it doesn't load. Instead it loads the factory default home page.

I'm planning to make this item as a reusable component, to be used in any other instance.

Is there any alternate way in which we can make it non publishable and yet preview it.

2

You can create a subdomain for preview:

1.Create a (sub)domain for preview (e.g. preview.mysite.com) and setup DNS as needed

2.Add the preview host to the existing IIS Sitecore instance

3.Add a new node to the Sitecore instance’s config files

4.Set the new site to listen to the master database

<site name="website_preview" filterItems="false" enableWorkflow="true" hostName="preview.mysite.com" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content" startItem="/home" database="master" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="10MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="5MB" filteredItemsCacheSize="2MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" />

More information you can find here: http://firebreaksice.com/how-to-setup-a-sitecore-preview-site-to-review-content-before-publishing/

| improve this answer | |
  • Sorry I did not mention the other part which is making the item as a reusable component too be used in any other instance. For users,who wll use this package, setting up a DNS, host etc could be complex. – Qwerty Jun 25 '18 at 14:01
  • Never the less; the solution Vlad gives you here is the official solution to previewing items with publishing restrictions. – Mark Cassidy Jun 25 '18 at 17:30
  • 1
    This does not work for items marked as "Not Publishable", it only works for Publishable items that have not been published to the web database. Subtle but important difference. – jammykam Aug 28 '18 at 1:44
  • @jammykam did same, and only publishable item and previewed. – Pradeep Gupta Feb 4 at 13:26

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.