Does anyone know how to check page layout from javascript of current page in sharepoint 2013? Ideally I would prefer to not use any ajax calls.
Thanks
By using below code you will get the Page Layout URL of current page.
SP.SOD.executeFunc('sp.js', 'SP.ClientContext', sharePointReady);
function sharePointReady(){
var url = SP.Utilities.Utility.getLayoutsPageUrl(window.location.href);
/* DO YOU STUFF */
}
News Item based on the content type News Item. Then the value I got was /en/_layouts/15/http://mysite/en/Pages/testpagelayout.aspx.