c1-cms

Nested datafolders in Composite C1 v4.2


I'd like to create a datafolder or some similar construct that allows me to provide users of the Content perspective the ability to create a data element, but then under that data element to have the ability to create child data elements. I know I could put two data folders on the same page and have users create the parent items, then create the children items and select which parent they would be attached to but I was hoping a nested option existed.

A simple example would be to allow users to populate a menu by adding the menu items through a datafolder, but to also allow them to add children under the first level of menu items by right clicking that top tier menu item and adding another data element under it.

Is this possible?

Thank you!


Solution

  • If I understand your task correctly, you can make use of two global data types and a tree definition (aka "console app") to make it work together.

    I hope this sample covers most of what you need:

    http://docs.composite.net/Console/Tree-Definition-Samples/Two-Level-Data-Folder-App

    In general, you can look up information in the guide to C1 Console Apps:

    http://docs.composite.net/Console/Guide-to-Applications