How to add custom attribute to cq:text ?
hi,
currently using <cq:text property="text"/> display text in page.
i need find way add custom attribute text compnent (highlighted in example below).
eg.
====================================
<div id="cq-gen23" class="text section cq-element-parpanel_47text">
</div>
====================================
is there way can above?
here couple methods:
method 1:
add attribute while author in edit mode. implement own text component , configure dialog use event listener adds attribute each paragraph tag in component. listen "valid" event fires when author clicks ok button in widget. method added attribute stored in jcr. see documentation: http://dev.day.com/docs/en/cq/current/developing/widgets.html
method 2:
write javascript adds attribute each paragraph in component when page loaded. method attribute not stored in jcr. trivial jquery.
More discussions in Archived Spaces
adobe
Comments
Post a Comment