C# Class Sitecore.SharedSource.Commons.Utilities.LayoutUtil

Utility class for accessing various Layout Settings
Mostra file Open project: Velir/Sitecore-Commons

Public Methods

Method Description
GetDatasourceFromControl ( Database database, DeviceItem device, System.Item item, System.Item sublayoutItem ) : System.Item

When working with the Presentation Layer for Sitecore, you can specify a Datasource as a property for a control. However, accessing the item that is set brings a bit of a challenge. Hopefully this fixes that.

Method Details

GetDatasourceFromControl() public static method

When working with the Presentation Layer for Sitecore, you can specify a Datasource as a property for a control. However, accessing the item that is set brings a bit of a challenge. Hopefully this fixes that.
Thrown when Sitecore can't find a specified datasource item entry.
public static GetDatasourceFromControl ( Database database, DeviceItem device, System.Item item, System.Item sublayoutItem ) : System.Item
database Database Sitecore Database to Use. Usually From Context.
device DeviceItem Sitecore Device to Use. Usually from Context.
item System.Item Item to get the Layout Renderings from.
sublayoutItem System.Item /// Item reference to the Sublayout or Webcontrol that you would like to use for getting the datasource from. ///
return System.Item