How to add visible menu item from php code (drupal)
Posted
by uta
on Stack Overflow
See other posts from Stack Overflow
or by uta
Published on 2010-04-24T19:44:14Z
Indexed on
2010/04/24
20:03 UTC
Read the original article
Hit count: 145
I have a content type with important "created" date field. And I have a menu link (in primary links) which is link to page that shows list of all nodes of my content type. (http://example.com/mycontenttype) I want to have menu links (visible in primary links) to each year when nodes of my content type are displayed (http://example.com/mycontenttype/2010). And I want to add these menu links from mymodule_nodeapi function, when the node is creating and only if it has a "created" date of new year. I know that I can create a pathes in mymodule_menu function, but it doesn't create a visible menu item. (Maybe I can somehow set parent_link_id or something else to do it?)
© Stack Overflow or respective owner