Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 4th, 2012  |  syntax: None  |  size: 0.81 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. this.AllSectionsQueryable = this.GetChildTaxa(this.StartingTaxaId);
  2. string fieldName = this.FieldName;
  3. this.ArticlesList = HelpArticleManager.GetDataItems(HelpArticleType)
  4.                                                 .Where(a => a.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live)
  5.                                                 .Where(art => art.GetValue<TrackedList<Guid>>(fieldName).Count>0).ToList();
  6. this.TreeDataSource = (from taxon in this.AllSectionsQueryable
  7.                                            join article in this.ArticlesList on taxon.Id equals article.GetValue<TrackedList<Guid>>(fieldName)[0]
  8.                                            orderby taxon.Ordinal
  9.                                            select new
  10.                                            {
  11.                                                    Id = article.Id,
  12.                                                    ParentId = taxon.Parent != null ? taxon.Parent.Id : Guid.Empty,
  13.                                                    TaxonId = taxon.Id,
  14.                                                    Title = taxon.Title.ToString(),
  15.                                                    Url = DataResolver.Resolve(article, "URL")
  16.                                            }).ToList();