Reputation: 65
i want to add id tags to primary links menu.. it should look something like this:
<li><a id="home" href="#">Home</a></li>
<li><a id="about" href="#">About</a></li>
<li><a id="contact" href="#">Contact</a></li>
currently, it's just
<li><a href="/test/drupal/content/home">Home</a></li>
<li><a href="/test/drupal/content/about">About</a></li>
<li><a href="/test/drupal/content/contact">Contact</a></li>
to change the address to "#" is it ok to use url aliases?
I just want to add attributes to l() when it creates the primary menu, thatz it in a nutshell..
any suggestions? should i edit any file or create new function to do this job? I'm using zen theme(just for an info) many thanks..
Upvotes: 2
Views: 1527
Reputation: 43
Have you looked at using the Menu Class module? You can create menu class sets and then assign them to each individual menu items.
Upvotes: 1
Reputation: 33275
It seems like you want to alter the links, so you can add some js tabs. If that is the case:
In Drupal, there are some different ways to alter the output of the primary menu.
theme_menu_item_link
, this wont help much though, since, that function is used for all menu items.Upvotes: 3