http://code.msdn.microsoft.com/office/SharePoint-2013-Create-9bfa6f5c/view/SourceCode#content This link provides a way to create a new publishing page using ECMA SCRIPT . But it creates a page with a random name . I want to set its Name and Pagelayout at the creation of page. pageInfo = new SP.Publishing.PublishingPageInformation(); pageInfo.set_name($("MyHomePage.aspx"); newPage = pubWeb.addPublishingPage(pageInfo); |
But the above doesnot work! Help!