내 커뮤니티 업적 표시줄을 확대합니다.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

AEM moves div tag - how to fix?

Avatar

Level 1

I have an AEM component with the following structure:

<div A>

    <div B>

         <div C />

    </div B>

    <div D>

         <div E />

    </div D>

</div A>

However, it shows in my AEM pages with this structure:

<div A>

    <div B>

         <div C />

    </div B>

</div A>

<div D>

    <div E />

</div D>

What is causing this, and how do I fix it?  Thanks!

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor

Could you please share your component code, may be issue with HTML structure.

I tried same in 6.3, working fine for me.

Screen Shot 2018-05-15 at 3.10.50 PM.png

Screen Shot 2018-05-15 at 3.11.26 PM.png

Thanks

Arun

Arun Patidar

AEM LinksLinkedIn

원본 게시물의 솔루션 보기

5 답변 개

Avatar

Level 10

The only time i know of why AEM modifies DIVs of a component is related to eidting the component as discussed here -- https://aemcorner.com/aem-how-to-remove-div-wrapper-from-component/

Avatar

Level 1

I tried putting the cq:noDecoration="true" tag in the component that is giving me the trouble, but to no avail.  Am I doing this correctly?

Avatar

정확한 답변 작성자:
Community Advisor

Could you please share your component code, may be issue with HTML structure.

I tried same in 6.3, working fine for me.

Screen Shot 2018-05-15 at 3.10.50 PM.png

Screen Shot 2018-05-15 at 3.11.26 PM.png

Thanks

Arun

Arun Patidar

AEM LinksLinkedIn

Avatar

Level 10

I agree with Arun - i have developed many AEM components that include nested DIVS and never seen this happen.

Avatar

Administrator

Can you please share with us the package to debug this?

I have also checked and it is working fine for me on AEM 6.3 and 6.4.

-Kautuk



Kautuk Sahni