Removing decoration wrapper div in 6.3

Avatar

Avatar

jakej40603950

Avatar

jakej40603950

jakej40603950

18-01-2019

I tried options given in the following forum post to conditionally remove (i.e. only on publish) the decoration tag that AEM puts around any component but none of them worked:

Removing extra decoration tags in CQ5.6

Is there a new way of doing this in 6.3 and above?

Thanks.

Replies

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

18-01-2019

I see no AEM Doc topic that explains this - Decoration Tag

WHy do you want to do this?

Highlighted

Avatar

Avatar

jakej40603950

Avatar

jakej40603950

jakej40603950

20-01-2019

Many a times the HTML and associated styles may be developed by a different team and won't contain the extra divs AEM adds - and that messes up the HTML designs when you finally use them within AEM. That's why it would have been good if there's a way to turn off the decoration tags without affecting the edit-ability of the components.

Highlighted

Avatar

Avatar

cquser1

Avatar

cquser1

cquser1

21-01-2019

Hi,

Not sure if adding the below property helps.

cq:noDecoration="{Boolean}true"

Highlighted

Avatar

Avatar

Gaurav-Behl

MVP

Total Posts

1.1K

Likes

226

Correct Answer

281

Avatar

Gaurav-Behl

MVP

Total Posts

1.1K

Likes

226

Correct Answer

281
Gaurav-Behl
MVP

21-01-2019

Decoration Tag​ mentioned by Scott should work fine if that is supposed to work on publish server only.

Highlighted

Avatar

Avatar

kautuk_sahni

Community Manager

Total Posts

5.5K

Likes

955

Correct Answer

1.1K

Avatar

kautuk_sahni

Community Manager

Total Posts

5.5K

Likes

955

Correct Answer

1.1K
kautuk_sahni
Community Manager

22-01-2019

AEM offers clear and simple logic controlling the decoration tags that wrap included components. Whether and how the decoration tag is rendered is defined by the combination of two factors, which this page will dive into:

  • The component themselves can configure their decoration tag with a set of properties.
  • The scripts that include components (HTL, JSP, dispatcher, etc) can define the aspects of the decoration tag with include parameters.

See Decoration Tag