Extensibility | Resolving List Definitions

Inspired by Tridion Stack Exchange Question.

There is one more thing about list definition which is not used enough despite being flexible and powerful.

It is List Definition Path resolver.

In dashboard view you can define associations between items and theirs list representations (configured in list definitions). You can do so specifying EditorName, ViewID, ControlID, parent ItemID regular expression mask and associated definition path. When dashboard is asked to load content of the item which fits the conditions, it will render the list, based on associated definitions.

To define this association in extension you should extend existing editor configuring listdefinition section in the extensions section.

In this case all items in FilteredItemsList from DashboardView whose parent item ID matches the ^tcm:0$ rule will be rendered with /Xml/Definitions/ListDefinition.xml definition.

It might happen when, for instance, CME (or any other extension) defines an association, and UGC (or any other extension) defines the same association, and both associations idRegExpMasks are applied to the same item.
In this case the following rules are used to determine the association priority:

Priority View Control Item Id
1 X X X
2 - X X
3 X - X
4 - - X
5 X X -
6 - X -
7 X - -
8 - - -

In simple, the more specific the association is, the higher priority it has.


There is one step further you can do.

When you define an association, you can also define path resolver which will resolve this association definition path.

@handler is a JavaScript resolver which has to resolve the path to definition. Defining this attribute you should still have @url defined, however you can keep it empty.

The resolver usage is very simple, it has the following parameters: EditorName, ViewId, ControlId, itemId. And as a result it should return the path to the List Definition XML file.

And then it is up to you how to resolve the path. You can map it to HTTP handler and pass a bunch of parameters. And then leave it up to the server to decide what should be output.

You also have an access to entire CME runtime, and can simply use repository or all other variables you might need to use.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>