1
|
# Menu Attributes
|
2
|
|
3
|
|
4
|
## Introduction
|
5
|
|
6
|
This simple module allows you to specify some additional attributes for menu
|
7
|
items such as id, name, class, style, and rel.
|
8
|
|
9
|
You should use this module when:
|
10
|
|
11
|
* You want to "nofollow" certain menu items to sculpt the flow of PageRank
|
12
|
through your site.
|
13
|
* You want to give a menu item an ID so you can easily select
|
14
|
it using jQuery.
|
15
|
* You want to add additional classes or styles to a menu item.
|
16
|
|
17
|
The module currently allows you to set the following attributes for each menu
|
18
|
item or menu link:
|
19
|
|
20
|
* id
|
21
|
* name
|
22
|
* target
|
23
|
* rel
|
24
|
* class
|
25
|
* style
|
26
|
* accesskey
|
27
|
|
28
|
For further information please visit the following:
|
29
|
|
30
|
* For a full description of the module, visit the project page:
|
31
|
[https://drupal.org/project/menu_attributes](https://drupal.org/project/menu_attributes)
|
32
|
* To submit bug reports and feature suggestions, or to track changes:
|
33
|
[https://drupal.org/project/issues/menu_attributes](https://drupal.org/project/issues/menu_attributes)
|
34
|
|
35
|
## Installation
|
36
|
|
37
|
1. To install the module copy the 'menu_attributes' folder to your
|
38
|
*sites/all/modules* directory.
|
39
|
2. Go to admin/modules. Filter for ‘Menu Attributes’ and enable the module. Read
|
40
|
more about installing modules at [http://drupal.org/node/70151](http://drupal.org/node/70151)
|
41
|
|
42
|
## Configuration
|
43
|
|
44
|
1. Go to *admin/people/permissions*. Filter for the ‘Menu Attributes’ section.
|
45
|
Set appropriate permissions.
|
46
|
2. Go to *admin/structure/menu/settings*. Review instructions on this screen.
|
47
|
3. Go to *admin/build/menu*
|
48
|
4. Select the menu links you want to edit (In this example we will edit the menu
|
49
|
'Navigation’).
|
50
|
5. Under operations for that menu, click ‘list links’.
|
51
|
6. Click on any 'edit' link under the 'Operations' column.
|
52
|
7. Scroll down the page to find the 'Menu link attributes' and 'Menu item
|
53
|
attributes' sections. Expand either section by clicking on it.
|
54
|
|
55
|
a. **Menu link attributes** are added to the `<a>` link element. Follow
|
56
|
instructions on screen.
|
57
|
|
58
|
b. **Menu item attributes** are added to the `<li>` list element for that
|
59
|
link. Follow instructions on screen.
|
60
|
|
61
|
10. Click the 'Save' button.
|
62
|
|
63
|
Another way of setting menu attributes is to edit any page, scroll to 'Menu
|
64
|
settings' and click the checkbox for ‘Provide a menu link’. This will reveal the
|
65
|
options for this menu item, including ’Menu link attributes' and 'Menu item
|
66
|
attributes'. Follow instructions on screen.
|
67
|
|
68
|
|
69
|
## Troubleshooting
|
70
|
|
71
|
1. Go to the module issue queue at
|
72
|
[http://drupal.org/project/issues/menu_attributes?status=All&categories=All](http://drupal.org/project/issues/menu_attributes?status=All&categories=All)
|
73
|
2. Check if your particular issue exists. If not, click on the CREATE A NEW
|
74
|
ISSUE link.
|
75
|
3. Fill the form.
|
76
|
4. To get a status report on your request go to
|
77
|
[http://drupal.org/project/issues/user](http://drupal.org/project/issues/user)
|
78
|
|
79
|
|
80
|
## Updating
|
81
|
|
82
|
Read more at [http://drupal.org/node/250790](http://drupal.org/node/250790)
|