Поделиться через


Свойство NavigationTerm.AssociatedFolderUrl

Gets or sets the URL value that is used to associate some page URLs with this NavigationTerm object to indicate the location of the properties in the site map provider hierarchy.

Пространство имен:  Microsoft.SharePoint.Publishing.Navigation
Сборка:  Microsoft.SharePoint.Publishing (в Microsoft.SharePoint.Publishing.dll)

Синтаксис

'Декларация
Public MustOverride Property AssociatedFolderUrl As String
    Get
    Set
'Применение
Dim instance As NavigationTerm
Dim value As String

value = instance.AssociatedFolderUrl

instance.AssociatedFolderUrl = value
public abstract string AssociatedFolderUrl { get; set; }

Значение свойства

Тип: System.String
The URL for an associated folder.

Замечания

This property is used to help calculate the CurrentNode property for a SiteMapProvider. The current node indicates the location of the page in the navigation hierarchy, such, as displayed by a breadcrumb control "Investor Relations News Press Releases". Typically the current node is determined by searching the navigation hierarchy to find a node whose link matches the URL of the page being viewed, such as “/Pages/PressReleases/January2010.aspx". If a current node cannot be found (for example, the January2010.aspx page is not linked by any navigation node), then the breadcrumb would be empty. This problem can be solved by assigning the containing folder "/Pages/PressReleases" to the AssociatedFolderUrl property of the "Press Releases" term; the breadcrumb will now show "Investor Relations News Press Releases" for any page in that folder unless the page is explicitly linked by a navigation node.

The URL must be server-relative and may contain tokens such as ~site/ (representing the server-relative URL for the associated SPWeb object) or ~sitecollection/ (representing the server-relative URL for the associated SPSite object). These tokens are expanded by methods such as GetResolvedAssociatedFolderUrl().

См. также

Справочные материалы

NavigationTerm класс

Элементы NavigationTerm

Пространство имен Microsoft.SharePoint.Publishing.Navigation

SiteMapProvider.CurrentNode