Posts tonen met het label custom wiki page. Alle posts tonen
Posts tonen met het label custom wiki page. Alle posts tonen

donderdag 14 juni 2012

SharePoint 2010: Create a custom wiki page

How to create a custom wiki page in SharePoint 2010 with a simple FeatureReceiver?


With this code it's pretty easy:

private string wikiFullContent = string.Empty;

public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
using (SPWeb web = properties.Feature.Parent as SPWeb)
{
//* Define page payout
wikiFullContent = FormatBasicWikiLayout();
//* Add page to library
SPList sitePages = web.Lists.TryGetList("$Resources:core,WikiLibDefaultTitle;");
if (sitePages == null)
{
sitePages = web.Lists.EnsureSitePagesLibrary();
}