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
Hello,
i was wondering if there is a way to detect whether a user is browsing in preview mode through the backend so f.e. http://a.local/umbraco/preview/?id=1145#?id=1145 or through the preview mode on the frontend f.e. http://a.local/custom-url
thanks :)
Hi Grety,
You can try to use:
Umbraco.UmbracoContext.InPreviewMode
Cheers
Thanks, but the InPreviewMode is true for both cases. So is the IsFrontEndUmbracoRequest variable. Both are true for both cases.
For now I've checked if the first segment of the url is numeric... but that's just dirty. Would love to change it to something cleaner.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Detect difference between preview modes
Hello,
i was wondering if there is a way to detect whether a user is browsing in preview mode through the backend so f.e. http://a.local/umbraco/preview/?id=1145#?id=1145 or through the preview mode on the frontend f.e. http://a.local/custom-url
thanks :)
Hi Grety,
You can try to use:
Cheers
Thanks, but the InPreviewMode is true for both cases. So is the IsFrontEndUmbracoRequest variable. Both are true for both cases.
For now I've checked if the first segment of the url is numeric... but that's just dirty. Would love to change it to something cleaner.
is working on a reply...