TaxonomyNavigation.TryParseFriendlyUrl method
Parses the specified absolute URL or server-relative URL to determine whether it is a friendly URL, a catalog friendly URL, or a root friendly URL.
Namespace: Microsoft.SharePoint.Publishing.Navigation
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
'Declaration
Public Shared Function TryParseFriendlyUrl ( _
site As SPSite, _
inputUrl As String, _
<OutAttribute> ByRef friendlyUrlTerm As NavigationTerm, _
<OutAttribute> ByRef catalogUrlSegments As String() _
) As Boolean
'Usage
Dim site As SPSite
Dim inputUrl As String
Dim friendlyUrlTerm As NavigationTerm
Dim catalogUrlSegments As String()
Dim returnValue As Boolean
returnValue = TaxonomyNavigation.TryParseFriendlyUrl(site, _
inputUrl, friendlyUrlTerm, catalogUrlSegments)
public static bool TryParseFriendlyUrl(
SPSite site,
string inputUrl,
out NavigationTerm friendlyUrlTerm,
out string[] catalogUrlSegments
)
site
Type: Microsoft.SharePoint.SPSiteThe SPSiteobject that the URL belongs to.
inputUrl
Type: System.StringThe URL to be parsed in absolute or server-relative form.
friendlyUrlTerm
Type: Microsoft.SharePoint.Publishing.Navigation.NavigationTermFor a root friendly URL (that is, one based on the site welcome page), this output is a null reference (Nothing in Visual Basic). For a friendly URL or a catalog friendly URL, it returns the term that defines it. This parameter is onlymeaningful when the function returns true.
catalogUrlSegments
Type: []If the input URL is a catalog friendly URL, then this output array reports the additional URL segments. If the input URL is a regular friendly URL, then the array will have zero elements. If the function returns false, then the array has zero elements.
Type: System.Boolean
true if the URL is a friendly URL, catalog-friendly URL, or root URL; otherwise, false
If the URL is a friendly URL, a catalog friendly URL, or a root friendly URL, then this method returns true and assigns the output parameters; otherwise, it returns false.
Microsoft.SharePoint.Publishing.Navigation namespace