Whenever it comes to structured information such as downloads or images, most times they are ordered and sorted within folders.
The same applies to websites - they are structured into different sections.
So why not combining both?
Taken as an example, a website contains a download-page. Located on the download-page is a hierarchy of subfolders, each containing additional folders or files. While browsing the website, the bread-crumb navigation may show the single folders, but why not integrating them into the main navigation?
With Kajona v4, this will be possible and is implemented by the galleries and downloads by default.
Navigation on current page:
Implementing the code-snippets is an easy one. Every page-element may register additional navigation-entries by implementing the method
public function getNavigationEntries()
The method is called in context of the current page, so when implementing the element, you only have to validate if you want to add nodes to the current page, the structure itself is build by the framework.
The method should return a structure as used by the navigation, so something like
node => class_module_navigation_point ,
subnodes => array(
array( node => class_module_navigation_point, subnodes => array(...)),
array( node => class_module_navigation_point, subnodes => array(...))
(see class_element_portal::getNavigationEntries() )
That's it. The nodes will be attached to the current page-node and rendered in the navigation itself.