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.
SOLVED

Add attribute in Parsys Div

Avatar

Level 6

I want to add one extra attribute in AEM generated divs

Eg: Normally I get as below

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

I want to add an attribute like

<div class="parbase component section" newattribute> </div>

1 Accepted Solution

Avatar

Correct answer by
Level 10

I dont think so this provides an options to add attribute instead of class.

I would suggest you to create extra DIV in your HTML for this attribute.

OR

Write a 3-4 lines of JS code to Add this attribute.

Could you please elaborate your use case?

thanks

View solution in original post

5 Replies

Avatar

Level 10

If you are looking to avoid these automatic div's denerated by AEM, use "cq:noDecoration" property. This way extra div's, apart from your html will not be generated.

Avatar

Level 6

I wanted to add in <div class="parbase target section"></div> 

Not for the component , but if it is  targeted, i  need to add the attribute in above div which is not a part of component

Avatar

Level 6

I want to use IncludeOptions to add attribute instead of class. Is it possible ?

Avatar

Correct answer by
Level 10

I dont think so this provides an options to add attribute instead of class.

I would suggest you to create extra DIV in your HTML for this attribute.

OR

Write a 3-4 lines of JS code to Add this attribute.

Could you please elaborate your use case?

thanks