Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Product version: |
EPiServer Connect for Sharepoint 2007 version 2.0 |
---|---|
Document version: |
1.0 |
Document last saved: |
25-11-2008 |
This technical note document describes how to use EPiServer Connect for Microsoft SharePoint 2.0 solution to function optimally.
• A functioning SharePoint (WSS or MOSS) Web server.
• A Web server running EPiServer CMS 5 R2
The configuration file of the Web site should be set to correct values. Configuration is described in the EPiServer Connect for Microsoft SharePoint 2.0 Installation Instructions.
There is an issue when updating items on the SharePoint side. If a corresponding page for the item was deleted on the EPiServer CMS Web site then the user will get an exception page.
Complete the following steps in order to resolve this issue and see the code example below.
protected void Application_Start(Object sender, EventArgs e)
{
//TODO: Add your code here
DataFactory.Instance.MovedPage += new PageEventHandler(DataFactory_MovedPage);
//TODO: Add your code here
}
void DataFactory_MovedPage(object sender, PageEventArgs e)
{
// check e.PageLink though should never be
// null or empty in this event
if (!PageReference.IsNullOrEmpty(e.PageLink))
{
// e.Page is null in this event, we need to load the
// PageData via e.PageLink to be able to check
// it's PageTypeID
PageData page = DataFactory.Instance.GetPage(e.PageLink);
// value of this property below
// should probably be read from configuration
int pageTypeIdIAmInterestedIn = 4;
if (e.TargetLink.ID == EPiServer.Configuration.Settings.
Instance.PageWastebasketId &&
page.PageTypeID == pageTypeIdIAmInterestedIn)
{
DataFactory.Instance.Delete(e.PageLink,
true, EPiServer.Security.AccessLevel.NoAccess);
}
}
}