Comment 4 for bug 1396435

Revision history for this message
Robert Lyon (robertl-9) wrote :

To test out the change for the tertiary menu option: (comment taken from patch comment)

To add tertiary items to the top menu we set the menu item's path to include a third item eg:

path = 'myportfolio/collection/add'

If we want the tertiary menu item to link to a subnav item we add the 'parent' option to the menu item. It needs to match the 'path' value of the subnav menu item you want it to be the child of. This allows the item to be highlighted on page load after it (or it's parent) has been selected eg:

parent = 'myportfolio/collection

To test - either check out https://reviews.mahara.org/#/c/4052/, which has this tertiary menu in play for the webservices stuff under admin -> extensions

or checkout https://reviews.mahara.org/#/c/4051/ and edit the lib/web.php and add some tertiary level items to a *_nav() menu (not rightnav one though)
eg: mahara_standard_nav()

add after the myportfolio/collection array, this:

'myportfolio/collection/list' => array(
'path' => 'myportfolio/collection/list',
'parent' => 'myportfolio/collection',
'url' => 'collection/index.php',
'title' => get_string('Collections', 'collection'),
'weight' => 10,
),
'myportfolio/collection/add' => array(
'path' => 'myportfolio/collection/add',
'url' => 'collection/index.php',
'title' => 'Add collection',
'weight' => 20,
),

This will add two tertiary items to the nav menu