hook-menu

Drupal: menu items tokens ?

hi, I need to add a menu item with the following link: user/16/addresses It is the link to a tab of user profiles. Of course 16 is the user ID and it should change according to the user. Can I use tokens directly into menu items ? such as [uid] ? thanks ...

Drupal excessive menu parts

In a module development (webtv) I am providing a generic block that can be configured for its contents (playlists). On the configure form there is a list of added contents (playlists) along with links "add new playlist" and "edit" existing one placed next to each entry. As the block configuration path is: "admin/build/block/configure/[my...

Locale module and language prefix in url

I had been working on module and well aware of hook_menu for passing url arguments to call back. For instance: $items['webtv/block/%/playlist/edit/%'] = array( ... 'page callback' => 'drupal_get_form', 'page arguments' => array('webtv_playlist_form', 5, 2), ... ); and callback as function webtv_playlist_form($form_sta...

How to append to a drupal modules page callback

Say you have a page callback from Module #1 using hook_menu(). You want to create Module #2 that would basically just append something on the bottom of Module #1's page callback (think of having some notes you wanted to add to the bottom of the page). How could you do this? My understanding is that you could use hook_menu_alter to compl...

How can I alter the body_classes_array through hook_menu?

I'd like to add a css class to the body_classes_array as if I were using template_preprocess_page to alter &$vars, but I'd like to do it through hook_menu() page callback. Is it even possible to do? ...

Drupal module menu item not showing in menu primary-links

I'am trying to get a menu item to show in the 'primary-links'. i've read this, but that is not working. What am I doing wrong? /** * Implementation of hook_menu(). */ function modulename_menu() { $items = array(); $items['test'] = array( 'title' => t('test'), 'description' => 'some description', ...