Skip to content

Commit

Permalink
Admin menu sitemap allows the specific display order #240
Browse files Browse the repository at this point in the history
  • Loading branch information
support committed Apr 2, 2022
1 parent 1f2992c commit ac92f5e
Show file tree
Hide file tree
Showing 4 changed files with 145 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ public virtual async Task<IList<AdminSiteMap>> GetSiteMap()
return await _cacheBase.GetAsync($"ADMIN_SITEMAP", async () =>
{
var query = from c in _adminSiteMapRepository.Table
orderby c.DisplayOrder ascending
select c;

var list = query.ToList();
if (list.Any())
return list;
else
return await Task.FromResult(StandardAdminSiteMap.SiteMap);
return await Task.FromResult(StandardAdminSiteMap.SiteMap.OrderBy(x=>x.DisplayOrder).ToList());
});
}
}
Expand Down
Loading

0 comments on commit ac92f5e

Please sign in to comment.