Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
We are using umbraco just as an API CMS to return markup through to our website (thus they are on different websites) but when trying to build a custom Preview Page Viewer im struggling to return the latest saved version of the page in place of the latest published version to allow the request to return the markup of the saved version.
The main crux of the issue is that running
requestedItem = UmbracoContext.Current.ContentCache.GetByRoute(isPreview, requestedPath);
is returning the same content whether we pass a True or a False in to the isPreview flag.
Some things i've made sure of:
A back office user is logged in as part of the preview request so as to allow
UmbracoContext.Current.Security.CurrentUser != null
I've made sure the API request is sending an UMB_PREVIEW cookie is sent with a Guid so EnsureInitialized has a previewSet correctly working
I've looked through the documentation on IPublishedCache, ContextualPublishedContentCache, PreviewContent.cs and a whole lot more but am still not coming up with any ideas on how to correctly return an IPublishedContent of the node
Did you resolve this issue Chris? I am interested in doing something similar. Thanks Jonny
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted