I'm developing a custom container component in Adobe CQ5.5 and I'd like to have a custom message as a placeholder instead of the default "Drag components or assets here".
What I found out until now is that I have to add cq:emptyText="My custom placeholder message". Probably I'm missing something as this property gets completely ignored. Here's my component's folder structrure:
- [clientlib]
- .content.xml
- _cq_editConfig.xml
- dialog.xml
- myContainer.jsp
According to Adobe's official tutorials and also this wonderful tutorial for building an Accordion container, the cq:emptyText should go into the _cq_editConfig.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
cq:actions="[edit]"
cq:dialogMode="floating"
cq:emptyText="Drag My Custom components here"
jcr:primaryType="cq:EditConfig">
<cq:listeners
jcr:primaryType="cq:EditListenersConfig"
afteredit="REFRESH_PAGE"/>
</jcr:root>
Unfortunately, even with cq:emptyText included I'm still seeing the default placeholder text.
Any help will be highly appreciated!
Thanks!
Stan.
UPDATE:
After Tomek's suggestions, I still get "Drag components or assets here" instead of my custom message so I'm still looking for an answer. My component's file structure now looks like this: - [clientlib] - [new] ---- .content.xml ---- _cq_editConfig.xml - .content.xml - _cq_editConfig.xml - dialog.xml - tabContainer.jsp
.content.xml
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
cq:isContainer="{Boolean}true"
jcr:primaryType="cq:Component"
jcr:title="Tab Container"
jcr:description="Container component for tab pages"
sling:resourceSuperType="foundation/components/parsys"
componentGroup="MyComponents"/>
_cq_editConfig.xml
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
cq:actions="[edit]"
cq:dialogMode="floating"
jcr:primaryType="cq:EditConfig">
<cq:listeners
jcr:primaryType="cq:EditListenersConfig"
afteredit="REFRESH_PAGE"/>
</jcr:root>
new/.content.xml
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:Component"
jcr:title="New Paragraph"
sling:resourceType="foundation/components/parsys/new"
componentGroup=".hidden"/>
new/_cq_editConfig.xml
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
cq:actions="[_clear,insert]"
cq:emptyText="Drag My Custom components here"
jcr:primaryType="cq:EditConfig" />