I have a cq page with a component included by using <cq:include />
I would like to get the included component dialog open on the page load, rather than waiting for author to double click on the component area.
Thank you, Sri
this is something i had done when i want to open dialog
<script type="text/javascript">
<% if (((String)properties.get(configuration.getInherited("connectedWhen", "username"), "")).trim().equals("")) { %>
CQ.WCM.onEditableReady("<%= resource.getPath() %>", function(editable){
CQ.wcm.EditBase.showDialog(editable);
}, this);
<% } %>
</script>
or if you want a more clean code try this :
CQ.WCM.onEditableReady("<%= resource.getPath() %>", function(editable){
CQ.wcm.EditBase.showDialog(editable);
}, this);
Hope it'll help.. :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With