Access child' child element in CustomContentAreaRenderer

Vote:
 

Is it possible to access child elements of ContentArea children for manipulating their attributes? I have CustomContentAreaRenderer with overriden RenderContentAreaItem method. I have CurrentItem, its index and content but can't access to its children.

Has anybody faced similar problem? 

#192398
Edited, May 16, 2018 11:20
Vote:
 

What do you mean with ContentArea children? You should probably just manipulate the wrapping element for the whole property and the wrapping element for each item in the content area renderer. If you want to manipulate anything lower in the hierarchy you should do that in each content item renderer.

If I understand you correctly, then the easiest solution would be to override

void BeforeRenderContentAreaItemStartTag(TagBuilder tagBuilder, ContentAreaItem contentAreaItem)

and then add the attributes to the tagBuilder. 

#192420
May 16, 2018 15:16
Vote:
 

Thank you, Johan!

#192421
May 16, 2018 15:22
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.