Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

AEM 6.3 PARSYS NO DECORATION

Avatar

Former Community Member

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

3 Replies

Avatar

Level 10

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?

Avatar

Level 1

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("");

        }

Avatar

Level 3

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.