PublishingPage.Route method (PublishingPage)
Routes a PublishingPage object by using the content organizer rules.
Namespace: Microsoft.SharePoint.Publishing
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
Syntax
'Declaration
Public Shared Function Route ( _
originalPage As PublishingPage _
) As PublishingPage
'Usage
Dim originalPage As PublishingPage
Dim returnValue As PublishingPage
returnValue = PublishingPage.Route(originalPage)
public static PublishingPage Route(
PublishingPage originalPage
)
Parameters
originalPage
Type: Microsoft.SharePoint.Publishing.PublishingPageThe PublishingPage object to be routed.
Return value
Type: Microsoft.SharePoint.Publishing.PublishingPage
The PublishingPage object after routing.
Remarks
If the RequiresRouting property of the PublishingPage object is true, and the PublishingPage matches one of the content organizer rules, then the PublishingPage is routed to the new location based on the rule; otherwise, the [PublishingPage] object stays in the current location.
Regardless of whether the PublishingPage object is routed, the RequiresRouting property is set to false and the PublishingPage is checked in after the method is called.
Examples
PublishingWeb web;
PublishingPage pageBeforeRouting;
... get PublishingWeb and PublishingPage instances
PublishingPage pageAfterRouting = PublishingPage.Route(pageBeforeRouting);