Example #1
0
        public override object GetValue(IContent content, PropertyInfo property, Type collectionItemType)
        {
            var result = GetPagesCollection(
                () => ContentLoader.GetChildren <IContent>(content.ContentLink),
                collectionItemType);

            return(result);
        }
Example #2
0
        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)));
        }
Example #3
0
 protected Lazy <IEnumerable <NodeContent> > GetCatalogChildNodes(ContentReference contentLink)
 {
     return(new Lazy <IEnumerable <NodeContent> >(() =>
                                                  ContentLoader.GetChildren <NodeContent>(contentLink)
                                                  .ToList()));
 }
Example #4
0
 protected IEnumerable <TNodeContentBase> GetNodeChildren <TNodeContentBase>(ContentReference contentLink)
     where TNodeContentBase : NodeContentBase
 {
     return(ForVisitor(() => ContentLoader.GetChildren <TNodeContentBase>(contentLink)));
 }
Example #5
0
 protected IEnumerable <TEntryContentBase> GetEntryChildren <TEntryContentBase>(ContentReference contentLink)
     where TEntryContentBase : EntryContentBase
 {
     return(ForVisitor(() => ContentLoader.GetChildren <TEntryContentBase>(contentLink).Where(x => x.IsAvailableInCurrentMarket())));
 }