Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

Create Publishing pages using ECMASCRIPT

$
0
0

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");
pageInfo.set_pageLayoutListItem("CT_CustomLayout");

newPage = pubWeb.addPublishingPage(pageInfo);

But the above doesnot work! Help!


Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>