
Untitled
By: a guest on
Jul 4th, 2012 | syntax:
None | size: 0.81 KB | hits: 13 | expires: Never
this.AllSectionsQueryable = this.GetChildTaxa(this.StartingTaxaId);
string fieldName = this.FieldName;
this.ArticlesList = HelpArticleManager.GetDataItems(HelpArticleType)
.Where(a => a.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live)
.Where(art => art.GetValue<TrackedList<Guid>>(fieldName).Count>0).ToList();
this.TreeDataSource = (from taxon in this.AllSectionsQueryable
join article in this.ArticlesList on taxon.Id equals article.GetValue<TrackedList<Guid>>(fieldName)[0]
orderby taxon.Ordinal
select new
{
Id = article.Id,
ParentId = taxon.Parent != null ? taxon.Parent.Id : Guid.Empty,
TaxonId = taxon.Id,
Title = taxon.Title.ToString(),
Url = DataResolver.Resolve(article, "URL")
}).ToList();