Is there a way to add links to the primary links using PHP in Drupal 6? The reason I ask is that I want to add more links in the footer of the web page, which I don't want to put in the top navigation level.


You can either specifiy the menu name in hook_menu() (look for 'menu_name') if they are defined with that hook or you can use menu_link_save().

Yet another option would be to use http://drupal.org/project/features and export your menu structure as a feature.

  • Any concrete example ? (i'm just starting drupal)
    – Disco
    Apr 21 '11 at 13:21

I don't know the details of how to do it, but I know you may use hook_menu_link_alter() or override the primary links function theme_links() in template.php.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.