Ways to identify wcm mode in Javascript/Jquery

nehacms-0r3f0r

16-02-2017

Hi,

We want to fetch wcmmode value in our custom Javascript file, based on mode some condition needs to be executed. Can you please let us know ways to fetch those.

We have tried using

if(!CQ || !CQ.WCM || !(CQ.WCM.isEditMode(true) || CQ.WCM.isDesignMode(true))){}

but it says CQ is null, though CQ object was there. Any other way we are looking for.

 

Thanks,

Neha

View Entire Topic