Determine runmode in Adobe CQ

后端 未结 7 945
渐次进展
渐次进展 2021-01-02 00:44

How do I programmatically know which run-mode the instance is running? I created a custom tag that provides the config depending on the instance run-mode, but I can not dete

7条回答
  •  無奈伤痛
    2021-01-02 01:22

    Finally I decided to use global.jsp, write run-modes in the page context and get it in my class:

    <%
    pageContext.setAttribute("runModes", sling.getService(SlingSettingsService.class).getRunModes().toString());
    %>
    

提交回复
热议问题