Hi All,
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?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi All,
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'];
}
Views
Replies
Total Likes
You need to write a dialog listener for the same.
You can refer to the above url for guidance.
Thanks
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
Here is the latest version of the document for AEM Assets 6.2 https://docs.adobe.com/docs/en/aem/6-2/develop/components/components-touch-optimized.html#Handling%2...
Views
Replies
Total Likes
Hi All,
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'];
}
Views
Replies
Total Likes