Accessing global object wcmmode in AEM from a handlebars template
I can access a component properties from an hbs template for that component like this:
{{properties.title}}but I want to access the wcmmode from that (https://docs.adobe.com/docs/en/aem/6-0/develop/sightly/global-objects.html) so I can decide to render or not some information in design or edit mode. I now you can access this variable in sightly using:
<p data-sly-test="${wcmmode.edit}">You are in edit mode</p> <p data-sly-test="${wcmmode.design}">You are in design mode</p>But that does not work on hbs, I tried:
<p data-sly-test="{{wcmmode.edit}}">You are in edit mode</p> <p data-sly-test="{{wcmmode.design}}">You are in design mode</p>That always evaluates as true regardless of the real mode. Any ideas on how to correctly access this?