Hi Neha,See this community article- http://labs.6dglobal.com/blog/2013-04-02/what-my-cq-mode/ . The CQ.WCM object provides methods for checking the current mode, however first you need to see if the object exists. CQ.WCM is not instantiated in publish mode, so it will return null in publish mode. ...