We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37108
    • 80 Posts
    My CMP has a field which is used to select a document from a particular container. This container is organized as such:
    Container
      --Publication 1
        --Year
          >Doc 1
          >Doc 2
        --Year
          >Doc 1
          >Doc 2
      --Publication 2
        --Year
          >Doc 1
          >Doc 2
        --Year
          >Doc 1
          >Doc 2

    And, so on.

    As a starting point, I've successfully built a flat list combobox (with the assistance of Mark H.), that grabs only non-container documents by createdon date. Now I want to go one step further and display the documents in the above structure (matching how they appear in the resource tree) in the combobox. Is there an already-established method to do this on the processor side? (Some research on the extJS side has revealed some ideas of how to display the resulting structured data on the js side using the tpl config and some custom functions.)
      • 33983 ☆ A M B ☆
      • 181 Posts
      Not sure if there is any method on the processor side to do what I think you are asking.

      Review the WayFinder extra code to see how they did it in PHP. I have been looking at similar issue of building trees/nodes and here is a site that has similar design to what MODX uses: The Adjacency List Model but it does not have the MODX caching. If you want to add multiple Ajax calls to your ExtJS combobox, I am not sure how you would do this. If the site resources is relatively small I would just populate the list via a single Alax call.