@idmatch
is the regular expression mask which if applied to list parent ID, then definition associated is applied to the List.
To extend existing views you should configure listdefinion
section in ext:listdefinitions
from your extension configuration. Like it is done at Gitgub config Example from previous post.
ECL items has a mask /^ecl:\d+-(?'providerId'[^\s-]+)-.*/
so you can define your list definition based on a provider ID.
For Instance for UIBeardcore provider if I'll use uibc
as a provided ID the regexp mask for folders will be like /^ecl:\d+-uibc-.*-folder$/
However, in your scenario, @handler
attribute is also probably worth to be taken into account. This attribute might be configured next to @idmatch
.
<listdefinition
idmatch="^ecl:\d+-uibc-.*-folder$"
url="/Xml/Definitions/HandlerListDefinition.xml"
handler="UIBeardcore.Editors.ListExtensions.DefinitionHandlers.HandleExtensionItemDefinition"/>
The intention of it is to add a definition path resolver:
Type.registerNamespace("UIBeardcore.Editors.ListExtensions.DefinitionHandlers");
UIBeardcore.Editors.ListExtensions.DefinitionHandlers.HandleExtensionItemDefinition = function UIBeardcore$Translators$HandleExtensionItemDefinition(editorName, view, controlId, itemId)
{
if ($models.getItemType(itemId) == $const.ItemType.FOLDER)
{
return $config.expandEditorPath("/Xml/Definitions/FolderListDefinition.xml", editorName);
}
return $config.expandEditorPath("/Xml/Definitions/ListDefinition.xml", editorName);
};
So you will have more space to implement definitions selections based on multiple conditions and information which might be accessed client side.
UPDATED: Added an article Extensibility | Resolving List Definitions to Tridion.UIBeardcore blog.