I want to display conditional edit for parsys
I am in Edit mode but I have a jsp variable readOnly, if this is true. I want to display parsys in readonly mode without gray border.
It should show all the components already dropped earlier in read only mode, but users cannot add any new component nor should see
<script type="text/javascript" id="cq-gen495">
CQ.WCM.edit({ ......});
</script>
<%if(readOnly){ %>
<cq:include path="<%=path%>" resourceType="/libs/foundation/components/parsys" /> <!--- but display only view no new component --->
<%}else%>
<cq:include path="<%=path%>" resourceType="/libs/foundation/components/parsys" />
<%}%>
Can you please let me know the best approach to do this?