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


Свойство NavigationTermSetItem.CatalogTargetUrlForChildTerms

Получает значение по умолчанию свойства CatalogTargetUrl для дочерних объектов NavigationTerm .

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

Синтаксис

'Декларация
Public ReadOnly Property CatalogTargetUrlForChildTerms As CustomizableString
    Get
'Применение
Dim instance As NavigationTermSetItem
Dim value As CustomizableString

value = instance.CatalogTargetUrlForChildTerms
public CustomizableString CatalogTargetUrlForChildTerms { get; }

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

Тип: Microsoft.SharePoint.Publishing.CustomizableString
По умолчанию значение свойства CatalogTargetUrl

Замечания

Это свойство является объектом CustomizableString . Значение по умолчанию наследуется от свойство CatalogTargetUrlForChildTerms.Value родительский объект NavigationTerm или NavigationTermSet , если не родительский термин. Для объекта NavigationTermSet значение по умолчанию — пустая строка.

Это свойство не влияет на URL-адрес целевого каталога для текущего объекта. Если не настроен, по умолчанию вместо наследуется из родительского узла. Для отключения по умолчанию CatalogTargetUrl для дочерних узлов, GetCustomizableStringCustomValueприсвойте пустую строку.

Свойство CatalogTargetUrl применяется только в случае, если свойство LinkType имеет FriendlyUrl.

Примеры

Рассмотрим веб-узел с объект набора терминов навигации, должна содержать эта иерархия терминов.

- About Us
- Products 
- Cars
- Trucks
- Motorcyles
- ContactThe following code will configure the child terms /products/cars, /products/trucks, and /products/motorcycles to share a common target URL (Rollup.aspx) and a common catalog target URL (CatalogItem.aspx).void CreateProductsHierarchy(NavigationTermSet termSet)
            {
                NavigationTerm productsTerm = termSet.CreateTerm("Products", NavigationLinkType.FriendlyUrl);
                productsTerm.TargetUrl.Value = "~site/Pages/Products.aspx";
                productsTerm.TargetUrlForChildTerms.Value = "~site/Pages/Rollup.aspx";
                productsTerm.CatalogTargetUrlForChildTerms.Value = "~site/Pages/CatalogItem.aspx";
            
                productsTerm.CreateTerm("Cars", NavigationLinkType.FriendlyUrl);
                productsTerm.CreateTerm("Trucks", NavigationLinkType.FriendlyUrl);
                productsTerm.CreateTerm("Motorcycles", NavigationLinkType.FriendlyUrl);
            
                termSet.GetTaxonomyTermStore().CommitAll();
            }
In this example, note that using the CatalogTargetUrlForChildTerms property avoids the need to assign the same value to the CatalogTargetUrl for each of the child terms. If a new term is created, it will automatically inherit this setting.

См. также

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

NavigationTermSetItem класс

Элементы NavigationTermSetItem

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