Quantcast
Channel: Adobe Community : Popular Discussions - CQ5 (read only)
Viewing all articles
Browse latest Browse all 12476

Changing the CQ5 generated div tag around components

$
0
0

We are going to use CQ5 as a content platform to be consumed by another service which is the end-point for our users. As in we will be providing HTML for small sections of the front facing websites.

 

To alleviate any issues that might come up from this integration, we are going to add a prefix to all our CSS classes, ids, and put all our JavaScript in namespaces. The problem is the cq:include tag creates a <div> element around the component's JSP code and then adds the component name, super types, and JCR node title as CSS classes for this div. For example:

 

<div class="parbase image tout-image">    <img src="..." class="prefix-our-image" /></div><div class="subtitle tout-subtitle">    <div class="prefix-our-subtitle-div prefix-subtitle">        <h2>Header Subtitle</h2>    </div></div>

 

Is there any way we can change the default behavior of CQ5 to prefix the css classes and IDs? At least in non-edit mode as to not break the author experience as seen by setting cq:noDecoration to true. We tried cq:cellName but didn't see that changing anything. We are using CQ5.4.


Viewing all articles
Browse latest Browse all 12476

Trending Articles