| 1 |
*******************************************************
|
| 2 |
README.txt for jump.module for Drupal
|
| 3 |
*******************************************************
|
| 4 |
The jump module allows administrators to create a quick dropdown
|
| 5 |
"Jump Menu" from any configured menu or vocabulary in the system.
|
| 6 |
|
| 7 |
Administrators may also easily create jump menus by sending in
|
| 8 |
an options array containing path/title associations.
|
| 9 |
|
| 10 |
Suggested use:
|
| 11 |
|
| 12 |
1. Create a block with the input format set to "PHP code"
|
| 13 |
2. Put the following into the block body:
|
| 14 |
|
| 15 |
<?php
|
| 16 |
print jump_quickly(1);
|
| 17 |
?>
|
| 18 |
|
| 19 |
This will give you a block with a dropdown for each menu item
|
| 20 |
that belongs to the menu with id 1 (usually this is the Navigation
|
| 21 |
menu). Change the 1 to any menu id in order to have that menu's
|
| 22 |
items appear in the dropdown.
|
| 23 |
|
| 24 |
3. If you don't know what menu id you are looking for, put this
|
| 25 |
in your block:
|
| 26 |
|
| 27 |
<?php
|
| 28 |
print jump_menu_item_list(0);
|
| 29 |
?>
|
| 30 |
|
| 31 |
This will print out the top level menu names along with their
|
| 32 |
ids. When you find the one you want, go back to step 2 and put
|
| 33 |
in the correct id.
|
| 34 |
|
| 35 |
Another suggested use:
|
| 36 |
|
| 37 |
1. Create a block with the input format set to "PHP code"
|
| 38 |
2. Put the following into the block body:
|
| 39 |
|
| 40 |
<?php
|
| 41 |
print jump_quickly(5, 'taxo');
|
| 42 |
?>
|
| 43 |
|
| 44 |
This will give you a dropdown containing all the terms in
|
| 45 |
the vocabulary with vid 5.
|
| 46 |
|
| 47 |
Yet another suggested use:
|
| 48 |
|
| 49 |
1. Create a block with the input format set to "PHP code"
|
| 50 |
2. Put the following into the block body:
|
| 51 |
|
| 52 |
<?php
|
| 53 |
global $user;
|
| 54 |
$options = array(
|
| 55 |
'user/'. $user->uid => t('My User Account'),
|
| 56 |
'tracker/'. $user->uid => t('My Posts'),
|
| 57 |
'logout' => t('Log Out')
|
| 58 |
);
|
| 59 |
print jump_quickly($options);
|
| 60 |
?>
|
| 61 |
|
| 62 |
This will give you a dropdown with three items in it -- My User Account,
|
| 63 |
My Posts, and Log Out. This gives you the most flexibility, but requires
|
| 64 |
a bit more actual PHP in your snippet.
|