C# 클래스 Sitecore.Modules.WeBlog.Extensions.ItemExtensions

Provides utilities for working with Sitecore items
파일 보기 프로젝트 열기: WeTeam/WeBlog

공개 메소드들

메소드 설명
DoesFieldRequireWrapping ( this item, string fieldName ) : bool

Determines if the field given by name needs to have it's output wrapped in an additional tag

FindAncestorByAnyTemplate ( this item, IEnumerable templateIds ) : System.Item

Finds the current type of item for the given item

FindAncestorByTemplate ( this item, ID templateId ) : System.Item

Finds the current type of item for the given item

FindAncestorByTemplate ( this item, string template ) : System.Item

Finds the current type of item for the given item

FindItemsByTemplateOrDerivedTemplate ( this rootItem, TemplateItem template ) : System.Item[]

Find items below another based on the specified template or a derived template

GetItemTitle ( this item ) : string

Gets the content of the title field if not empty, otherwise the item name

GetUrl ( this item ) : string

Get the URL for an item

TemplateIsOrBasedOn ( this item, ID templateId ) : bool

Determine if an item is based on a given template or if the item's template is based on the given template

TemplateIsOrBasedOn ( this item, IEnumerable templateIds ) : bool

Determine if an item is based on a given template or if the item's template is based on the given template

비공개 메소드들

메소드 설명
GetCurrentItem ( this item, ID templateId ) : System.Item
GetCurrentItem ( this item, string template ) : System.Item
TemplateIsOrBasedOn ( TemplateItem itemTemplate, ID baseTemplate ) : bool
TemplateIsOrBasedOn ( TemplateItem itemTemplate, TemplateItem baseTemplate ) : bool
TemplateIsOrBasedOn ( this item, TemplateItem template ) : bool

메소드 상세

DoesFieldRequireWrapping() 공개 정적인 메소드

Determines if the field given by name needs to have it's output wrapped in an additional tag
public static DoesFieldRequireWrapping ( this item, string fieldName ) : bool
item this The item to check field on
fieldName string The name of the field to check
리턴 bool

FindAncestorByAnyTemplate() 공개 정적인 메소드

Finds the current type of item for the given item
public static FindAncestorByAnyTemplate ( this item, IEnumerable templateIds ) : System.Item
item this The item to search from
templateIds IEnumerable The template the target item must be based on or derived from
리턴 System.Item

FindAncestorByTemplate() 공개 정적인 메소드

Finds the current type of item for the given item
public static FindAncestorByTemplate ( this item, ID templateId ) : System.Item
item this The item to search from
templateId ID The template the target item must be based on or derived from
리턴 System.Item

FindAncestorByTemplate() 공개 정적인 메소드

Finds the current type of item for the given item
public static FindAncestorByTemplate ( this item, string template ) : System.Item
item this The item to search from
template string The template the target item must be based on or derived from
리턴 System.Item

FindItemsByTemplateOrDerivedTemplate() 공개 정적인 메소드

Find items below another based on the specified template or a derived template
public static FindItemsByTemplateOrDerivedTemplate ( this rootItem, TemplateItem template ) : System.Item[]
rootItem this The item the item must be below
template TemplateItem The template to find item based on, or based on derivaties of the template
리턴 System.Item[]

GetItemTitle() 공개 정적인 메소드

Gets the content of the title field if not empty, otherwise the item name
public static GetItemTitle ( this item ) : string
item this The item to get the title for
리턴 string

GetUrl() 공개 정적인 메소드

Get the URL for an item
public static GetUrl ( this item ) : string
item this The item to get the URL for
리턴 string

TemplateIsOrBasedOn() 공개 정적인 메소드

Determine if an item is based on a given template or if the item's template is based on the given template
public static TemplateIsOrBasedOn ( this item, ID templateId ) : bool
item this The item to test the template of
templateId ID The ID of the template which the item's template should be or inherit from
리턴 bool

TemplateIsOrBasedOn() 공개 정적인 메소드

Determine if an item is based on a given template or if the item's template is based on the given template
public static TemplateIsOrBasedOn ( this item, IEnumerable templateIds ) : bool
item this The item to test the template of
templateIds IEnumerable The IDs of the templates which the item's template should be or inherit from
리턴 bool