PEAK XOOPS - A suggestion of hierarchical submenu in englishin japanese

Archive | RSS |
XOOPS
XOOPS : A suggestion of hierarchical submenu
Poster : GIJOE on 2007-03-08 03:43:25 (7612 reads)

in englishin japanese
$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)
) ,

Then you can get hierarchical submenus for theme's power.

When you assign the submenus for your theme, you should call XoopsModule::getInfo('sub') instead of XoopsModule::subLink().

$module->subLink()
$module->getInfo('sub')


This code flagment will be useful for the agility of your module.
In function of dirname_get_submenu, you should cache the result as a static variable.

xoops_version.php

$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 ) ;
}


You can find the latest d3forum and pico offer this kind of submenus.
I'll be happy if a lot of themes supporting hierarchical submenus are released.

0 comments

Related articles
Printer friendly page Send this story to a friend

Comments list

Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!