This project is read-only.

Default List for Containable Content Items in 1.8.1

Topics: General
Nov 18, 2014 at 3:14 PM
Good day!

I managed to create a List (MyList) and configured its "Contains" property for my custom content type (MyItem). MyItem is a Containable type and has container picker enabled and is also displayed in admin menu (New).

The question is: how to force the Orchard to set the MyList container for new MyItems when I create them in admin panel? It is inconvenient to set the container for each new item manually.
Nov 20, 2014 at 7:17 AM
You can restrict the content types your MyList can hold by going to its properties.
Also, you can restrict the content types any type of list (container) can hold by going to its content type editor and checking the "Restrict the item content types this type supports".
Nov 20, 2014 at 10:20 AM
Unfortunately, this doesn't lead to auto-population of the "Member of" property of the containable content item...
Nov 21, 2014 at 4:18 PM
You might try a Workflow, to set that property when an item of the containable type is created.