Sans Pareil Technologies, Inc.

Key To Your Business

Tree Views

Creating tree views involves three steps (two if not accessible from the menu).
  • Configure the /modules/books/trees node.
  • Create the tree and tree configuration classes.

Configure Menu

  • Navigate to Configuration->Menu in the admin interface.
  • Expand the books node.
  • Create a New content node under the booka node. It may be easier to copy an existing node such as the dms node in the menu tree and then modify.
  • Modify i18nBasename to the location of the localisation file (in our case usually ucp.books.messages that maps to the config/resources/ucp/books/ file).
  • Set icon to /.resources/icons/16/dot.gif to use the same icon used in other sections of the admin interface.
  • Set the value of label to the key used in the file.
  • Set the value of onclick to MgnlAdminCentral.showTree( ‘books’, ’/books/book’, true ). This instructs the system to load the books tree and start with the /books/book node in the repository.

Configure Module

  • Navigate to Configuration in the admin interface.
  • Navigate to the /modules/books root node.
  • If a child folder node trees does not exist, create it.
  • Create the books content node under the trees folder node. It may be easier to copy an existing tree node and paste to the parent trees node.
  • Set the class property value to ucp.books.cms.tree.Handler (this is the class that we create as the tree implementation).
  • Set the configurationClass property value to ucp.books.cms.tree.BooksConfiguration (this the class that handles fetching the parent node to display for the tree).
  • Set the i18nBasename property as before.
  • Set the repository property to books. We will be keeping all the books module content within a books workspace within the magnolia repository.

Create Classes

Create the Handler and Configuration classes under the ucp.books.cms.tree package (to correspond to the class names you specified in the module configuration section). In our system these classes reside under the /src/app directory tree.