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.

2 comments:

  1. Nice one.. This will be helpful.

    ReplyDelete
  2. Really cool post, highly informative and professionally written and I am glad to be a visitor of this perfect blog, thank you for this rare info!
    Regards adobe cq5 training in hyderabad

    ReplyDelete