| 1 |
The following are instructions on how to install and configure the
|
| 2 |
navigation.module with Drupal 4.4:
|
| 3 |
|
| 4 |
INSTALLATION:
|
| 5 |
|
| 6 |
Step 1)
|
| 7 |
Create the 'menu', 'menu_item' and 'menu_hierarchy' database tables.
|
| 8 |
If using MySQL, this can be done using the included 'navigation.mysql'
|
| 9 |
script. From the command line, you would type something like:
|
| 10 |
$ mysql -u<username> -p<password> < navigation.mysql
|
| 11 |
For example, if your username is 'drupal' and your password 'secret', you would type:
|
| 12 |
$ mysql -udrupal -psecret < navigation.mysql
|
| 13 |
|
| 14 |
|
| 15 |
Step 2)
|
| 16 |
Create a 'navigation' subdirectory within your 'modules' directory.
|
| 17 |
For example, from your root Drupal directory, type:
|
| 18 |
$ mkdir modules/navigation
|
| 19 |
|
| 20 |
Step 3)
|
| 21 |
Copy 'navigation.module' and 'navigation.css' into the 'navigation'
|
| 22 |
subdirectory that you just created.
|
| 23 |
|
| 24 |
Step 4)
|
| 25 |
Enable the navigation module.
|
| 26 |
|
| 27 |
Go to "administer >> configuration >> modules" and put a checkmark in
|
| 28 |
the 'status' column next to 'navigation'.
|
| 29 |
|
| 30 |
|
| 31 |
CONFIGURATION:
|
| 32 |
|
| 33 |
Step 5)
|
| 34 |
Create a new menu.
|
| 35 |
|
| 36 |
Go to "administer >> configuration >> menus >> create a new menu". At
|
| 37 |
minimum you must give your new menu a name. Then click Submit.
|
| 38 |
|
| 39 |
Step 6)
|
| 40 |
Create menu items.
|
| 41 |
|
| 42 |
Click "add menu items" and begin adding menu items. Refer to the
|
| 43 |
taxonomy help pages for more information on building hierarchical
|
| 44 |
structures. Buidling menus is just like building vocabularies.
|
| 45 |
|
| 46 |
The 'Menu item name' is what will be displayed when building the menu.
|
| 47 |
The 'URL' is where you will be taken when clicking the link. (It can
|
| 48 |
be on-site or off-site)
|
| 49 |
|
| 50 |
Step 7)
|
| 51 |
Enable your menu using the block administation page.
|
| 52 |
|
| 53 |
If you want CSS tabs, you will probably need to modify your theme,
|
| 54 |
adding a line that looks something like:
|
| 55 |
print navigation_display_tabs(#)
|
| 56 |
|
| 57 |
Be sure to replace "#" with the number of your menu. You can
|
| 58 |
determine the number of your menu by going to "administer >>
|
| 59 |
configuration >> menus" and clicking "edit menu". Now look in
|
| 60 |
the URL of the resulting administration page where it will
|
| 61 |
say something like "admin/system/menus/edit/menu/#'.
|
| 62 |
|
| 63 |
If you want a menu, simply enable the appropriate block. (Blocks
|
| 64 |
are automatically generated for all menus.) NOTE: Drupal core code
|
| 65 |
automatically creates a 'Navigation' block that is not in any way
|
| 66 |
related to this module. Your menu block will be named whatever you
|
| 67 |
named your menu.
|
| 68 |
|
| 69 |
If you want to display the menu somewhere other than in a block,
|
| 70 |
you can call the following function where appropriate:
|
| 71 |
print navigation_display_menu(#)
|
| 72 |
|
| 73 |
Step 8)
|
| 74 |
Optionally configure permissions for your menus and menu items.
|
| 75 |
|
| 76 |
If you wish to limit which user roles can view each of your menus
|
| 77 |
and/or menu items, you will need to enable this functionality at
|
| 78 |
"configuration >> modules >> navigation"
|
| 79 |
|
| 80 |
Once you enable 'Menu permissions' and/or 'Menu item permission',
|
| 81 |
you can then edit your menus and/or menu items, defining the
|
| 82 |
appropriate associations. Refer to the built in help for more
|
| 83 |
information.
|
| 84 |
|
| 85 |
Step 9)
|
| 86 |
Optionally associate your menus and menu items to the appropriate taxonomy.
|
| 87 |
|
| 88 |
This is currently Beta functionality -- it is difficult to configure.
|
| 89 |
|
| 90 |
If you would like the appropriate menu items to be visible whenever you
|
| 91 |
navigation arbitrary site content, you'll need to first enable this
|
| 92 |
functionality at "configuration >> modules >> navigation".
|
| 93 |
|
| 94 |
Next, you will need to define an association between your menu and one or
|
| 95 |
more vocabularies. (Be warned, associating more than one vocabulary to
|
| 96 |
a single menu can make the next step more confusing.) To associate a menu
|
| 97 |
with one or more vocabularies, go to: "configuration >> menus", and click
|
| 98 |
"edit menu" next to the menu you wish to modify.
|
| 99 |
|
| 100 |
Finally, you will need to define associations between your menu items
|
| 101 |
and taxonomy terms. This can be done by editing each of your menu items.
|