November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Actually I achieved desired behviour by implementing custom component based on page tree. It looks just like page tree but has root "For all sites", contains blocks and media and icons are displayed there.
Component declaration:
using EPiServer.Core; using EPiServer.Shell.ViewComposition; namespace Project.Web.Widgets { [Component] public class AssetsContentTreeComponent : ComponentDefinitionBase { public BlocksContentTreeComponent() : base("epi-cms/component/MainNavigationComponent") { LanguagePath = "/episerver/cms/components/pagetree"; Categories = new[] { "content" }; Settings.Add(new Setting("repositoryKey", AssetsTreeRepositoryDescriptor.RepositoryKey)); } public override string Title => "Assets tree"; public override string Description => "Managing assets content in a tree view."; } }
And descriptor for it:
using System; using System.Collections.Generic; using EPiServer.Core; using EPiServer.ServiceLocation; using EPiServer.Shell; namespace Project.Web.Widgets { [ServiceConfiguration(typeof(IContentRepositoryDescriptor))] public class AssetsTreeRepositoryDescriptor : ContentRepositoryDescriptorBase { public static string RepositoryKey => "AssetsTreeRepositoryDescriptorKey"; public override string Key => RepositoryKey; public override string Name => "Assets tree"; public override IEnumerable<Type> ContainedTypes => new[] { typeof(ContentData), }; public override IEnumerable<ContentReference> Roots => new[] { ContentReference.GlobalBlockFolder, }; public override IEnumerable<string> PreventDeletionFor => new[] { ContentReference.GlobalBlockFolder.ToString(), ContentReference.WasteBasket.ToString() }; public override IEnumerable<string> PreventCopyingFor => new[] { ContentReference.GlobalBlockFolder.ToString(), ContentReference.WasteBasket.ToString() }; } }
I referenced these sources:
https://github.com/Geta/Epi.UnfilteredContentTree
https://www.epinova.no/en/blog/custom-icontent-with-its-own-navigation-pane/
From EPiServer.CMS.UI 11.13.0, the statuses are available for assets pane too.
https://world.episerver.com/documentation/Release-Notes/ReleaseNote/?releaseNoteId=CMS-12249
EPiServer.CMS.UI 11.13.0 should be available on the NuGet server on Monday, November 19.
In pages tree there is status indicating icons (etc. for expired content):
But on the assets pane (blocks, media, forms) trees there are no icons for status indication so I can't ditinguish expired content from live content.
Is there any way to indicate wether content is expired for blocks and media?
Or a way to modify widget and draw icons by custom logic?