Saturday, July 9, 2016

How to populate the current page path to the dialog through EXT JS - AEM 6.1

This post will explain, how to populate the current page path to the dialog through EXT JS - AEM 6.1

Add the listener for the widget and use the below script.

function(widget) {
        var currentPath;
if(CQ.wcm.SiteAdmin.hasListSelection()) {
        var grid = CQ.wcm.SiteAdmin.getActiveGrid();
        var selections = grid.getSelectionModel().getSelections();
currentPath = selections[0].id;
console.log(currentPath);
widget.setValue(currentPath)
}
}








Contact Form

Name

Email *

Message *