定义复杂菜单

How can I make a menu like this

          AOption1 | BOption2 | COption3  <-- This is the basic menu of atk4

But If I make click over "Option1" I'd like a menu like this

ASubOption1 option1 option2 option3

ASubOption2 option1 option2 option3

And the same if I make click over "BOption2"

Maybe tabs ?

Thanks.

The menu included in Agile Toolkit is really simple one. What you can do is define a place for your sub-menu in the shared template and place the following code on your page:

$this->api->add('SubMenu',null,'SubmenuSpot');

then inside lib/SubMenu.php

class SubMenu extends Menu {
    function init(){
        parent::init();
        $this->addMenuItem('suboption1');
        $this->addMenuItem('suboption2');
    }
}

Otherwise you can define the menu using CSS and use Menu_Light class to trigger highlight a current menu option:

https://github.com/atk4/atk4/blob/master/lib/Menu/Light.php