Saturday, June 22, 2013

How to Remove CQ5 generated div tag around components

Add the below code in to global.jsp, which you include for all the component jsp's.

if (WCMMode.fromRequest(request) != WCMMode.EDIT && WCMMode.fromRequest(request) != WCMMode.DESIGN) {
       IncludeOptions.getOptions(request, true).forceSameContext(Boolean.TRUE);

This will not generate any more extra  <div> tags  for any number of components you add.

1 comment: