Drupal 6 how to automatically add content type to parent in menu

Is there a way to make each content type the default for the parent in the menu.

that is, I have a content type called "cats". How to make all "cats" automatically sit inside the "pet" menu item. You can also sort "cats" alphabetically in the menu

+2


source to share


5 answers


You can do this programmatically with a custom module.



in hook_nodeapi () op == "insert", you can check the type of $ node → and then use menu_link_save () to create the menu item.

+1


source


Afaik you cannot manipulate the order of menu items - however you could accomplish the same effect using Views.

You can use any default content type for a specific menu in admin / build / menu / settings and change the "Default menu for content" menu in your menu. But this menu will use all ALL content types. For this problem, you can also look in views.



Hope it helps!

+1


source


This tutorial does exactly what you want (and it is very easy to do)

This also uses menu_link_save()

, but you won't need to create a module.

+1


source


It looks like there's a Drupal module that does this

+1


source


It looks like it can be done by adjusting the menu accordingly. Take a look at the video here where the trainer sets up exactly what I think you described.

Hope it helps ...

0


source







All Articles