$modversino['sub'] can be extended as RECURSIVE like ...
array(
'name' => (name of this node)
'url' => (relative link from XOOPS_URL/modules/dirname/ )
'sub' => (array of sub nodes)
) ,
$module->subLink()
$module->getInfo('sub')
$modversion['sub'] = array() ;
if( is_object( @$GLOBALS['xoopsModule'] ) && $GLOBALS['xoopsModule']->getVar('dirname') == dirname ) {
require_once dirname(__FILE__).'/include/common_functions.php' ;
$modversion['sub'] = dirname_get_submenu( $mydirname ) ;
}