public static IEnumerable <string> Outline(this EntryContentBase productContent)
        {
            var nodes = ContentLoader.Value
                        .GetItems(productContent.GetNodeRelations().Select(x => x.Parent), productContent.Language)
                        .OfType <NodeContent>();

            return(nodes.Select(x => GetOutlineForNode(x.Code)));
        }
 private PromotionEntry CreatePromotionEntry(EntryContentBase entry, IPriceValue price)
 {
     var catalogNodes = string.Empty;
     var catalogs = string.Empty;
     foreach (var node in entry.GetNodeRelations(_linksRepository).Select(x => _contentLoader.Get<NodeContent>(x.Target)))
     {
         var entryCatalogName = _catalogSystem.GetCatalogDto(node.CatalogId).Catalog[0].Name;
         catalogs = string.IsNullOrEmpty(catalogs) ? entryCatalogName : catalogs + ";" + entryCatalogName;
         catalogNodes = string.IsNullOrEmpty(catalogNodes) ? node.Code : catalogNodes + ";" + node.Code;
     }
     var promotionEntry = new PromotionEntry(catalogs, catalogNodes, entry.Code, price.UnitPrice.Amount);
     Populate(promotionEntry, entry, price);
     return promotionEntry;
 }
        private PromotionEntry CreatePromotionEntry(EntryContentBase entry, IPriceValue price)
        {
            var catalogNodes = string.Empty;
            var catalogs     = string.Empty;

            foreach (var node in entry.GetNodeRelations(_linksRepository).Select(x => _contentLoader.Get <NodeContent>(x.Target)))
            {
                var entryCatalogName = _catalogSystem.GetCatalogDto(node.CatalogId).Catalog[0].Name;
                catalogs     = string.IsNullOrEmpty(catalogs) ? entryCatalogName : catalogs + ";" + entryCatalogName;
                catalogNodes = string.IsNullOrEmpty(catalogNodes) ? node.Code : catalogNodes + ";" + node.Code;
            }
            var promotionEntry = new PromotionEntry(catalogs, catalogNodes, entry.Code, price.UnitPrice.Amount);

            Populate(promotionEntry, entry, price);
            return(promotionEntry);
        }
        public static int SortOrder(this EntryContentBase productContent)
        {
            var node = productContent.GetNodeRelations().FirstOrDefault();

            return(node?.SortOrder ?? 0);
        }