Custom menus in the new Backoffice

Yeah, Its hard to explain to be honest: Its not super simple.

deep breath ! (or skip to the link to core code at the bottom!)

the core principles (without the technical bits) and working backwards in a manifest

  • you have a menu item,

    • kind “tree”
    • has a treeAlias, to tell it what the tree is.
  • so you have a “tree”

    • the point of the tree is to tell umbrco where the ‘treeRepository’ is
  • so you have a treeRepository.

    • the repository, is another pointer, this time to your store and data source,
    • it also has a method that tells umbraco how to get your tree route model. (the top level icon for the tree)
  • so next you have a ‘store’ and a data source :sweat_smile:

  • the store is fairly basic it extends UmbUniqueTreeStore

  • the source has three methods, getRootItems, getChildrenOf and getAncestorsOf, and these are what connect to your Controller to get the info for the tree


most of this i have lifted from the core a good place to look is the DictionaryItem tree.