Sunday, January 31, 2016

AEM:Solution to enable author edit option for components having cq:noDecoration=true

Put cq:noDecoration=true, for your components to avoid wrapper div. To enable editing in author mode, use the following scriptlet in the jsp of your component.

<% if (WCMMode.fromRequest(request) == WCMMode.EDIT || WCMMode.fromRequest(request) == WCMMode.DESIGN) {
 componentContext.setDecorate(true);
} %>

No comments: