Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isPreview - BRE 14/15 isChannelManagerPreviewRequest() vs BRE 14/15 isPreview() #33

Open
zcher82 opened this issue Mar 20, 2024 · 0 comments
Assignees

Comments

@zcher82
Copy link

zcher82 commented Mar 20, 2024

upgrading from BRE 14 to 15, I noticed that components we were hiding using page.isPreview() is now showing up on live preview site, as opposed to previously ONLY showing up in experience manager (BRE 14).

HstRequestContext in BRE 14 & 15 provide two distinguishing 'isPreview' methods: https://xmdocumentation.bloomreach.com/library/concepts/channels/jsp-code-to-find-out-whether-a-request-is-a-preview-or-cms-request.html.

I believe isPreview returns !!this.model.meta.preview;. what exactly is model.meta.preview reading from BRE? How is it being set? is it set with HstRequestContext isPreview or isChannelManagerPreviewRequest? or is the value set a different way? is there a different method that i missed that would be more precise than page.isPreview?

the goal is to display my component in Experience Manager Preview, but NOT in live preview pages. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants