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
I know from within XSLT you can use the umbraco libraries to get at session variables and other things. Is there a way to determine if you are in preview mode?
Running 4.7.1
Hi Scooter,
When you are in Preview mode, a cookie with the name of "UMB_PREVIEW" is set. So you could check for that in your XSLT?
<xsl:if test="umbraco.library:RequestCookies('UMB_PREVIEW') != ''"> ... </xsl:if>
(I haven't tested this)
Cheers, Lee.
Works like a charm! Thanks!
Why is "works like a charm" the accepted answer? pfff..
Hi Fabio,
I guess it's just a mistake; I think I've seen it happen before. And once you've marked an answer as the "accepted" one, you can't change it back.
(And you don't get karma for answering your own questions, so there's no gain in doing it on purpose either :)
/Chriztian
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Detect Preview Mode from xslt
I know from within XSLT you can use the umbraco libraries to get at session variables and other things. Is there a way to determine if you are in preview mode?
Running 4.7.1
Hi Scooter,
When you are in Preview mode, a cookie with the name of "UMB_PREVIEW" is set. So you could check for that in your XSLT?
(I haven't tested this)
Cheers, Lee.
Works like a charm! Thanks!
Why is "works like a charm" the accepted answer? pfff..
Hi Fabio,
I guess it's just a mistake; I think I've seen it happen before. And once you've marked an answer as the "accepted" one, you can't change it back.
(And you don't get karma for answering your own questions, so there's no gain in doing it on purpose either :)
/Chriztian
is working on a reply...