[DOCU-2107] Help customers in configure content app using different node types Created: 22/Jan/21  Updated: 19/Feb/21

Status: Open
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Viet Nguyen Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
depends upon MGNLCT-137 Apps can have a hierarchy of types, e... Accepted
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Documentation update required:
Yes

 Description   

How to configure content app using different node types.

Use case:
The case is, we try to create a node that allows to create and edit other node type inside this. For example: a content-app "country" that implements mgnl:country nodes to create and edit mgnl:destination item (without creating a destination content-app) like a node tree.

Europe (mgnl:folder)
    ├───France (mgnl:country)
    ├───Italy  (mgnl:country)
    └───Spain  (mgnl:country)
        ├───Barcelona  (mgnl:destination)
        ├───Cadiz      (mgnl:destination)
        └───Madrid     (mgnl:destination)

We know that on Magnolia 5 can be implement with each types of nodes and they can use their icons and different action of each type of node.

Can you help us to implement that on Magnolia 6.2.5?


Our example:
Currently our Content Types module does not support multiple node types autogenerated apps. However you could always configure your app which uses multiple nodetypes such as our demo below:
https://demo.magnolia-cms.com/.magnolia/admincentral#app:resources:edit;/contacts/apps/contacts-v8.yaml:edit

You can use different icons for different nodetypes by configure "nodeTypeToIcon" property:

    workbench:
      contentViews:
        - name: tree
          dropConstraint:
            $type: jcrDropConstraint
            primaryNodeType: mgnl:contact
          $type: treeView
          columns: &columns
            - name: jcrName
              label: name
              $type: jcrTitleColumn
              editable: true
              nodeTypeToIcon:
                mgnl:contact: icon-people
                mgnl:content: icon-folder
              editor:
                availability:
                  nodes: true
                  properties: true

Also different actions on different nodetypes:

    actions:
      addFolder:
        $type: addNodeAction
        icon: icon-add-folder
        nodeType: mgnl:content
        availability:
          root: true
          nodeTypes:
            content: mgnl:content
      addNode:
        $type: addNodeAction
        icon: icon-add-node-content
        nodeType: mgnl:contentNode
        availability:
          root: true

Please help us document this properly for further referencing of other customers.


Generated at Mon Feb 12 01:24:07 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.