Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Ways to identify wcm mode in Javascript/Jquery

Avatar

Avatar
Validate 1
Level 2
nehacms-0r3f0r
Level 2

Likes

5 likes

Total Posts

36 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
nehacms-0r3f0r
Level 2

Likes

5 likes

Total Posts

36 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile
nehacms-0r3f0r
Level 2

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

Avatar

Avatar
Validate 1
Level 2
nehacms-0r3f0r
Level 2

Likes

5 likes

Total Posts

36 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
nehacms-0r3f0r
Level 2

Likes

5 likes

Total Posts

36 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile
nehacms-0r3f0r
Level 2

16-02-2017

We are getting CQ undefined in console, but when checked in firebug console CQ object is existing