/// <summary> /// Returns the Child Items of the current DataItem /// ** Sitefinitysteve.com Extension ** /// </summary> public static IQueryable <DynamicContent> GetChildren(this DynamicContent dataItem, Type type = null) { if (dataItem != null) { DynamicModuleManager dynamicModuleManager = DynamicModuleManager.GetManager(); bool hasChildren = dynamicModuleManager.HasChildItems(dataItem); if (hasChildren) { //dynamicModuleManager.LoadChildItemsHierarchy(dataItem); var items = dynamicModuleManager.GetChildItems(dataItem, type); return(items); } } return(new List <DynamicContent>().AsQueryable()); }