获取使用Rest Api时呈现的PublishingPageContent

时间:2018-06-25 08:18:21

标签: rest sharepoint sharepoint-2010 sharepoint-2013

我最近在SharePoint上遇到此问题: https://sharepoint.stackexchange.com/questions/221059/get-publishingpagecontent-rendered-when-using-rest-api

由于没有提供此问题的答案,我只是想知道是否其他人可能已经解决了该问题或同时找到了解决方法?

最诚挚的问候!

1 个答案:

答案 0 :(得分:0)

https://blogs.msdn.microsoft.com/sowmyancs/2008/03/15/create-publishing-pages-in-portal-sites-programmatically-and-add-it-into-a-specific-folders-inside-the-pages-library/

发布页面(如上面的代码中所列)使页面处于“待定”批准状态。也以编程方式批准页面  –只需使用SPFile类的Publish和Approve方法:

publishingPage.CheckIn(checkInComment);

SPFile pageFile = publishingPage.ListItem.File;

       pageFile.Publish(checkInComment);

       pageFile.Approve(checkInComment);

在此处列出:http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.publishingpage.description.aspx