Expand my Community achievements bar.

SOLVED

How to get current run mode of an AEM instance (author or publisher)

Avatar

Level 3

Hi,

How we can know current run mode of AEM instace i.e. Author or Publisher

Similar to getting WCMMode using  WCMMode.fromRequest(request)

Thanks

LM

1 Accepted Solution

Avatar

Correct answer by
Level 10
Please use below code:- <% pageContext.setAttribute("runModes", sling.getService(SlingSettingsService.class).getRunModes().toString()); %>

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10
Please use below code:- <% pageContext.setAttribute("runModes", sling.getService(SlingSettingsService.class).getRunModes().toString()); %>