Add new example
The new add example shows how to use the $categoryConfig property to create a menu with submenus, where each category in the backend creates a menu point.
Basically you have to use this code:
<div id="menu">
<ul>
<?php
foreach($cms->categoryConfig as $category) {
echo '<li>'.$category['name'];
echo '<ul class="submenu">'; // start the submenu, which is inside the li of the category
// create a menu from the category (without the third menuTag parameter, it will just return an array with links)
foreach($cms->createMenu('category',$category) as $menuElement)
echo '<li>'.$menuElement.'</li>';
echo '</ul>';
echo '</li>';
}
?>
</ul>
</div>
See the example here.