Take the community feedback survey now.
AI OnAI Off
Take the community feedback survey now.
Trying to solve the same issue.
To me it seems that epi-cms/asset/hierarchicalList is a base component that needs to be inherited in your own custom widget, which makes the description in CMS-8817 misleading.
You either need to make a custom component that extends the HierarchicalList and adds, amongst others, the noDataMessage or you can try this quickfix:
[Component]
public sealed class MyComponent : SharedBlocksComponent
{
public MyComponent()
{
Categories = new[] { "content" };
Title = "My";
LanguagePath = "/components/my";
SortOrder = 1000;
PlugInAreas = new[] { PlugInArea.AssetsDefaultGroup };
Settings.Add(new Setting("repositoryKey", MyProvider.Key));
}
}
Good suggestion, i went for the workaround and used another component instead. I did not get the languagePath thing to work in my context so i used the media component instead.
[Component]
public class AssetComponent : ComponentDefinitionBase
{
public AssetComponent() : base("epi-cms/component/Media")
{
Title = tabName;
Categories = new string[] { "content" };
SortOrder = 1000;
Description = "Displays external assets";
PlugInAreas = new[] { PlugInArea.AssetsDefaultGroup };
Settings.Add(new Setting("repositoryKey", AssetProvider.Key));
}
}
I have a content provider where I used the epi-cms/widget/hierarchicalList for component.
When I change to the new "epi-cms/asset/hierarchicalList" I get an error, the folder structure is displayed but the content/assets are not.
I get the following error when trying to select a folder
Uncaught TypeError: Cannot read property 'single' of null
in the epi-cms/asset/view-model/HierarchicalListViewModel.
/Johan