private IEnumerable <CategoryDescriptor> GetCategories(IContent content) { var describeContext = new DescribeElementsContext { Content = content }; var elementCategories = _elementManager.GetCategories(describeContext).ToArray(); return(elementCategories.Where(category => category.Elements.Any(x => !x.IsSystemElement))); }
public ActionResult Browse() { var categories = RemoveBlueprints(_elementManager.GetCategories(DescribeElementsContext.Empty)).ToArray(); var viewModel = new BrowseElementsViewModel { Categories = categories }; return(View(viewModel)); }
public ActionResult Browse() { if (!Services.Authorizer.Authorize(Permissions.ManageLayouts, T("Not authorized to manage layouts."))) { return(new HttpUnauthorizedResult()); } var categories = RemoveBlueprints(_elementManager.GetCategories(DescribeElementsContext.Empty)).ToArray(); var viewModel = new BrowseElementsViewModel { Categories = categories }; return(View(viewModel)); }