| 1 |
README file for the Menu Trim Drupal module.
|
| 2 |
|
| 3 |
|
| 4 |
Description
|
| 5 |
***********
|
| 6 |
|
| 7 |
The Menu Trim module allows menu hierarchies to be trimmed when navigated. By
|
| 8 |
trimming, here we mean skipping the display of parent menu items when any of
|
| 9 |
some designated items becomes active.
|
| 10 |
|
| 11 |
At the simplest level, this module allows to hide a menu until some of its items
|
| 12 |
has become the active item (by reaching the corresponding url). This is easier
|
| 13 |
than configuring the menu's block visibility for each possible path contained in
|
| 14 |
the menu.
|
| 15 |
|
| 16 |
This module can be used to make a "contextual secondary menu" based on the
|
| 17 |
primary links (e.g. you set the Primary links menu for "Allow trimming for this
|
| 18 |
menu, hide menu when no item is active", activate the "Primary links
|
| 19 |
(Menu trim)" block, then edit the menu's top-level items and check the "Trim
|
| 20 |
parent items" option). After that, when an item is selected in the primary
|
| 21 |
links, the contextual menu will appear, showing only the subitems of the
|
| 22 |
selected item. Drupal already allows contextual "secondary links" based on the
|
| 23 |
primary links, but these secondary links are limited to a depth of one
|
| 24 |
level. Menu Trim, on the other hand, can display complete menu subtrees.
|
| 25 |
|
| 26 |
This module can also be used in any menu to trim parents when reaching deep menu
|
| 27 |
items. This can make deep menus more usable, and the breadcrumb will still show
|
| 28 |
the full path.
|
| 29 |
|
| 30 |
|
| 31 |
Installation
|
| 32 |
************
|
| 33 |
|
| 34 |
1. Extract the 'menu_trim' module directory into your Drupal modules directory.
|
| 35 |
|
| 36 |
2. Enable the Menu Trim module on your site's Administer > Site building >
|
| 37 |
Modules page.
|
| 38 |
|
| 39 |
3. Go to Administer > Site configuration > Menu trim, and configure some menus
|
| 40 |
to allow trimming. Select "Allow trimming, hide when inactive" if you not
|
| 41 |
only want a menu to be trimmed on some designated items, but to also make it
|
| 42 |
"contextual" (appearing only when the url is matching some of its items is
|
| 43 |
requested).
|
| 44 |
|
| 45 |
4. Go to Administer > Site building > Blocks, and enable the "Menu trim" blocks
|
| 46 |
for each of the menus for which trimming was allowed.
|
| 47 |
|
| 48 |
5. Go to Administer > Site building > Menus, and edit each item that needs its
|
| 49 |
parents to be trimmed by checking "Trim parent items" in the item's edit
|
| 50 |
form.
|
| 51 |
|
| 52 |
|
| 53 |
Credits
|
| 54 |
*******
|
| 55 |
|
| 56 |
Initially developed on behalf of Koumbit.org (http://koumbit.org).
|