예제 #1
0
 public override object ProcessValue()
 {
     return(Context.Content?
            .Children
            .Where(_contentIsVisible)
            .Select(x => new TreeNode
     {
         Name = x.GetTitleOrName(StaticValues.Properties.Title),
         Url = x.GetUrl(StaticValues.DocumentTypes.Redirect, StaticValues.Properties.RedirectUrl),
         HasTemplate = x.TemplateId > 0,
         Description = x.GetPropertyValue <string>(StaticValues.Properties.Description),
         ImageUrl = _helper.GetImageUrl(x, StaticValues.Properties.ListingImage),
         Children = IncludeGrandChildren ? GetChildren(x) : null,
         NewWindow = x.DocumentTypeAlias == StaticValues.DocumentTypes.Redirect,
     }));
 }