Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

Component Wrapping Elements - Bug or Not?

Avatar

Level 8

AEM 6.1 with SP1 installed - when using the wcm/foundation/components/title and wcm/foundation/components/text components, they are wrapped in

<div class="section title"> </div>

and

<div class="parbase section text"></div>

respectively.

In 5.6.1 you can change the include options to not wrap the components, or, set the decoration tag to nothing.  I am unable to replicate this functionality in 6.1 and it's causing some rather large issues with some functionality i'm trying to implement.

Is this a bug or something that hasn't been implemented and should be a feature request, or am I completely missing something?

1 Accepted Solution

Avatar

Correct answer by
Level 8

Well I answered by own question I guess.  I created a options.jsp file with the following:

<%@include file="/libs/foundation/global.jsp"%> <%@ page import="com.day.cq.wcm.api.components.IncludeOptions" %><% IncludeOptions.getOptions(request, true).forceSameContext(Boolean.TRUE); IncludeOptions.getOptions(request, true).setDecorationTagName(""); componentContext.setDecorate(false); componentContext.setDecorationTagName(""); componentContext.setDefaultDecorationTagName(""); %>

And included it using:

<sly data-sly-include="options.jsp"></sly>

In my base page template and that successfully renders everything without the wrapping elements.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 8

Well I answered by own question I guess.  I created a options.jsp file with the following:

<%@include file="/libs/foundation/global.jsp"%> <%@ page import="com.day.cq.wcm.api.components.IncludeOptions" %><% IncludeOptions.getOptions(request, true).forceSameContext(Boolean.TRUE); IncludeOptions.getOptions(request, true).setDecorationTagName(""); componentContext.setDecorate(false); componentContext.setDecorationTagName(""); componentContext.setDefaultDecorationTagName(""); %>

And included it using:

<sly data-sly-include="options.jsp"></sly>

In my base page template and that successfully renders everything without the wrapping elements.

Avatar

Level 10

Thanks for posting this information.