/// <summary> /// Returns the DataSource item or the Context Item as strongly typed /// </summary> /// <typeparam name="T"></typeparam> /// <returns></returns> public T GetLayoutItem <T>(GetKnownOptions options = null) where T : class { var dataSource = WebContext.GetDataSourceItem(this); if (dataSource != null) { return(GetDataSource <T>(options)); } else { return(GetContext <T>(options)); } }
/// <summary> /// Returns the Data Source Item as strongly typed /// </summary> /// <typeparam name="T"></typeparam> /// <returns></returns> public T GetDataSource <T>(GetKnownOptions options = null) where T : class { options = options == null ? new GetKnownOptions() : options; return(WebContext.GetDataSourceItem <T>(this, options)); }