public override object GetValue(IContent content, PropertyInfo property, Type collectionItemType) { var result = GetPagesCollection( () => ContentLoader.GetChildren <IContent>(content.ContentLink), collectionItemType); return(result); }
private IEnumerable <TEntryContent> GetChildrenAndRelatedEntries <TEntryContent>(CatalogContentBase catalogContent) where TEntryContent : EntryContentBase { var variantContentItems = ContentLoader.GetChildren <TEntryContent>(catalogContent.ContentLink).ToList(); var variantContainer = catalogContent as IVariantContainer; if (variantContainer != null) { variantContentItems.AddRange(GetRelatedEntries <TEntryContent>(variantContainer)); } return(variantContentItems.Where(e => e.IsAvailableInCurrentMarket(CurrentMarket))); }
protected Lazy <IEnumerable <NodeContent> > GetCatalogChildNodes(ContentReference contentLink) { return(new Lazy <IEnumerable <NodeContent> >(() => ContentLoader.GetChildren <NodeContent>(contentLink) .ToList())); }
protected IEnumerable <TNodeContentBase> GetNodeChildren <TNodeContentBase>(ContentReference contentLink) where TNodeContentBase : NodeContentBase { return(ForVisitor(() => ContentLoader.GetChildren <TNodeContentBase>(contentLink))); }
protected IEnumerable <TEntryContentBase> GetEntryChildren <TEntryContentBase>(ContentReference contentLink) where TEntryContentBase : EntryContentBase { return(ForVisitor(() => ContentLoader.GetChildren <TEntryContentBase>(contentLink).Where(x => x.IsAvailableInCurrentMarket()))); }