How Can i disable a tab in author dialog based on the current page template? I know i need to use a listener, can someone please tell me how to use it?
Below function worked for me, thanks for your replies
function(dialog){ var pagePath = CQ.utils.WCM.getPagePath()+"/jcr:content.json"; var result = CQ.shared.HTTP.eval(pagePath); var currentTemplate = result['cq:template']; }
You cannot disable a tab based on template selection using listeners, as you have an instance of current dialog from which you cannot retrieve the current template.