/// <summary> /// Returns the Child Items of the current DataItems Parent, so like every content item on the same level as THIS item /// ** Sitefinitysteve.com Extension ** /// </summary> public static IQueryable <DynamicContent> GetChildrenFromParent(this DynamicContent dataItem, Type type = null) { if (type == null) { type = TypeResolutionService.ResolveType(dataItem.GetType().FullName); } if (dataItem != null) { return(DynamicContentExtensions.RetrieveDataThroughFiltering(type).Where(x => x.SystemParentItem.SystemParentId == dataItem.SystemParentId)); } else { return(new List <DynamicContent>().AsQueryable()); } }
public static IQueryable <DynamicContent> GetChildren(this DynamicContent dataItem, string type) { return(DynamicContentExtensions.GetChildren(dataItem, TypeResolutionService.ResolveType(type))); }