----- Original Message ----- From: "Augustin (Beginner)" <drupal.beginner@wechange.org> To: <development@drupal.org> Sent: Wednesday, December 05, 2007 8:39 AM Subject: [development] link to issue + solution Re: D7 small survey: listingof node types at/node/add
1) that Gábor 's hint is easy and very useful for D6, and simpler than what I sometimes had to do. I'll use that for now.
Will it work in D5? D6 is a distant dream for me, unfortuantely.
2) that there should be an even easier, more drupalish solution for D7.
That's even more distant. :) [In hook_menu(), create an item that maps node/add to your own function callback: $items[] = array('path' => 'node/add', 'title' => t('Create content'), 'callback' => 'mymodule_node_add', // -->> check this line. 'access' => user_access('access content'), 'type' => MENU_ITEM_GROUPING, 'weight' => 1); This will override the core callback for node/add. copy the function node_add() into a new function mymodule_node_add() which you can then customize anyway you want. At least, that's what I understood Gabor's comment to mean. It's simple and much more flexible than what I did before, but I don't like having to copy a whole core function just to remove one item.] I think I get this. Will have to digest it a bit. [That's very kind, but I still think it would be a bit premature... ;) I often look in awe at what many other members in this list accomplish regularly without breaking a sweat! ] Well, you're more advanced than me and I've been at this 2.5 years. :) Michelle