AEM 6.3 PARSYS NO DECORATION | Community
Skip to main content
March 9, 2018

AEM 6.3 PARSYS NO DECORATION

  • March 9, 2018
  • 3 replies
  • 2449 views

Hello,

I have a problem in the parsys: for example, in my sidebar, in preview or disabled mode, the wrapper (cq:htmlTag) of the first component is not closed, so it wrap also other components and it brokes my html.

I found several documents and guides (for example this: AEM | Remove wrapper HTML Tags in preview mode – Need is the mother of invention … , but also others), that say to set in my global.jsp this snippet of code:

<c:choose>

  <c:when test="${ requestScope['com.day.cq.wcm.api.WCMMode']=='EDIT' || requestScope['com.day.cq.wcm.api.WCMMode']=='DESIGN'}">

  <c:if test="${componentContext!=null}">

  <% componentContext.setDefaultDecorationTagName("div"); %>

  </c:if>

  </c:when>

  <c:otherwise>

  <c:if test="${componentContext!=null}">

  <% componentContext.setDefaultDecorationTagName(""); %>

  </c:if>

  </c:otherwise>

</c:choose>

The problem is that I already have a similar snipper of code, that disable decoration if it's not edit or design mode, but it not working.

I have AEM 6.3.

Thanks in advance, Daniel

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

smacdonald2008
Level 10
March 9, 2018

Please provide more information, Are you referring to custom components in the parsys?  Do you see this behavior with OOTB components? If you opened the We Retail sample site and dropped a few OOTB Core components - do you see this issue?

March 11, 2018

Hi,

You may implement a  javax.servlet.Filter and Disable CQ Decoration on cq:includes or sling:includes, only in Publish mode, it is required in edit mode to edit the component.

if (includeOptions != null &&  ((mode == null || WCMMode.DISABLED.equals(mode)))) {

            includeOptions.setDecorationTagName("");

        }

Level 3
March 11, 2018

Hey,

are you sure that nothing else is stopping parsys to render properly? I had the same problem with older version of AEM (6.1 SP1) but it turns out that there is an exception within one of components inside.