How to add visible menu item from php code (drupal)
- by uta
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?)