Determine runmode in Adobe CQ

后端 未结 7 946
渐次进展
渐次进展 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:30

    @Reference
    RunMode runmode;
    

    or

    sling.getService( RunMode.class )
    

    and call

    getCurrentRunModes(); //returns String[]
    

提交回复
热议问题