C# 클래스 Sitecore.SharedSource.Commons.Utilities.PresentationUtil

Utilities for dealing with presentation settings in Sitecore.
파일 보기 프로젝트 열기: Velir/Sitecore-Commons

공개 메소드들

메소드 설명
GetDeviceDefinition ( Item theItem, DeviceItem device ) : DeviceDefinition

Gets the device definition for a given item and device.

GetPlaceholderKeyName ( System.Web.UI.UserControl sublayout ) : string

Gets the name of the placeholder key that the passed in sublayout is bound to. This will return an empty string if for some reason we cannot get the placeholder name. You would use this from the code behind of a sublayout. So for example if I had a sublayout sltList and I wanted to know what placeholder it was bound to I would have something this in the code behind "string plcKeyName = PresentationUtil.GetPlaceholderKeyName(this);"

ItemHasPresentationSettingsForDevice ( Item theItem, DeviceItem device ) : bool

Checks to see if an item has presentation settings for the passed in device

ItemHasPresentationSettingsForLayout ( Item theItem, DeviceItem device, LayoutItem layoutItem ) : bool

Checks to see if the passed in item has presentation settings for the provided device and layout.

ItemHasPresentationSettingsForSublayout ( Item theItem, DeviceItem device, SublayoutItem sublayoutItem ) : bool

Checks to see if the passed in item has presentation settings for the provided device and sublayout.

TemplateHasPresentationSetDirectlyOnTemplate ( TemplateItem template ) : bool

Checks whether the presenation settings are set directly on a template, this should ususally be set on the standard values.

메소드 상세

GetDeviceDefinition() 공개 정적인 메소드

Gets the device definition for a given item and device.
public static GetDeviceDefinition ( Item theItem, DeviceItem device ) : DeviceDefinition
theItem Item The item.
device DeviceItem The device.
리턴 DeviceDefinition

GetPlaceholderKeyName() 공개 정적인 메소드

Gets the name of the placeholder key that the passed in sublayout is bound to. This will return an empty string if for some reason we cannot get the placeholder name. You would use this from the code behind of a sublayout. So for example if I had a sublayout sltList and I wanted to know what placeholder it was bound to I would have something this in the code behind "string plcKeyName = PresentationUtil.GetPlaceholderKeyName(this);"
public static GetPlaceholderKeyName ( System.Web.UI.UserControl sublayout ) : string
sublayout System.Web.UI.UserControl The sublayout.
리턴 string

ItemHasPresentationSettingsForDevice() 공개 정적인 메소드

Checks to see if an item has presentation settings for the passed in device
public static ItemHasPresentationSettingsForDevice ( Item theItem, DeviceItem device ) : bool
theItem Item The item to check.
device DeviceItem The device to check for.
리턴 bool

ItemHasPresentationSettingsForLayout() 공개 정적인 메소드

Checks to see if the passed in item has presentation settings for the provided device and layout.
public static ItemHasPresentationSettingsForLayout ( Item theItem, DeviceItem device, LayoutItem layoutItem ) : bool
theItem Item The item.
device DeviceItem The device.
layoutItem LayoutItem The layout item.
리턴 bool

ItemHasPresentationSettingsForSublayout() 공개 정적인 메소드

Checks to see if the passed in item has presentation settings for the provided device and sublayout.
public static ItemHasPresentationSettingsForSublayout ( Item theItem, DeviceItem device, SublayoutItem sublayoutItem ) : bool
theItem Item The item.
device DeviceItem The device.
sublayoutItem SublayoutItem The sublayout item.
리턴 bool

TemplateHasPresentationSetDirectlyOnTemplate() 공개 정적인 메소드

Checks whether the presenation settings are set directly on a template, this should ususally be set on the standard values.
public static TemplateHasPresentationSetDirectlyOnTemplate ( TemplateItem template ) : bool
template TemplateItem The template to check.
리턴 bool