This project is read-only.

MultiPicker Relations

Wire up a MultiPicker (currently ones that store a CSV of ID's, such as Multi-Node Tree Picker, XPath CheckBoxList, and the built in UltimatePicker) to Relation Types.

(as of version 2.2, Xml fragments saved by Multi-Node Tree Picker and XPath CheckBoxList are supported)


Prerequisites - Creating & Viewing Relations

 When dealing with relations in Umbraco, it is useful to install the Relation Types package from Our Umbraco. This will install a new tree in the Developer section, where you can create and view relations.


Configuring the Data Type

Property Alias  - MultiPicker to use as the source of IDs

Relation Type - associated RelationType, if it's of Parent to Child type then the Revrse Indexing checkbox is visible

Reverse Indexing -  if checked then the parent and child items are reveresed - the IDs from the MultiPicker become the parents, and the Context ID (Document, Media or Member using this datatype) become the child items.

  Parent Child
Bidirectional Context ID MultiPicker IDs
Parent to Child Context ID MultiPicker IDs
Parent to Child - Reverse Index MultiPicker IDs Context ID


Data Type in Use

The following example shows two Data Types of type MultiNode Relations. Both share the same MultiPicker alias, but each a different Relation Type, and one as a reverse index. 

The DataEditor is a label that displays if it's successfully found the associated MultiPicker and RelationType.

If the MultiPicker can't be found, or the RelationType expects a different ObjectType to that of the current context (Document, Media, Member), an error will be displayed..

The Relations are managed in an AfterSave event handler - here the MultiPicker ObjectTypes are validated with the RelationType.


Relations for Product to Colours

Relations for Colours to Product

Last edited Nov 28, 2011 at 2:35 PM by leekelleher, version 5