var resolver = request.getResourceResolver();
var pageManager = resolver.adaptTo(Packages.com.day.cq.wcm.api.PageManager);
return {
genericList:getList(<listName>)
};
function getList(url){
var listPage = pageManager.getPage(url);
if(listPage==null){
return;
}
var list = listPage.adaptTo(Packages.com.adobe.acs.commons.genericlists.GenericList);
var genericList= list.getItems();
return genericList;
}
});
No comments:
Post a Comment
If you have any doubts or questions, please let us know.