This hook enables modules to register paths in order to define how URL requests are handled.

learn more… | top users | synonyms

2
votes
1answer
28 views

array_flip() error while creating a menu item with form

My aim is to create a new menu item and display the user profile form on that page. Here is the code I am using. /** * Implements hook_menu(). * */ function profile_preferences_menu(){ ...
0
votes
0answers
17 views

Adding query to dynamic menu item with _to_arg()

I have a custom menu item that attempts to use a _to_arg function to dynamically add a query to the url. In the _to_arg() callback, whether using the url() function or passing back a plain string, I ...
0
votes
0answers
13 views

Module config page linked in admin toolbar

I created a config page for my new module. Whenever I enable the module, a link to the config page is added to my administration toolbar across the top of the screen as well as a configure link next ...
0
votes
1answer
26 views

hook_menu not available for ajax loaded links

I'm loading a datatable and its data into a panel, through ajax. Below is the link which can add the row(entry) to favorites. When I click the link, the jquery animation is executed properly but the ...
0
votes
0answers
14 views

How to pass a url as a hook menu argument

I need to send a url as a variable in path e.g. 2 arguments. The 2nd argument would need to be a url so http://www.blah.com. However, at the moment even if I use urlencode (which produces ...
0
votes
2answers
74 views

Create custom variables for a template file inside a menu callback function

here is a good one that has always stumped me. I would love to see a solution in both D6 and D7. I create custom modules and usually work with the menu api to create menu type -> MENU_CALLBACK. ...
0
votes
1answer
23 views

Login Users action in, $action_links, how do i edit it?

I am still very new to drupal and have let to use all the hooks and coding needed to do everything, now I have come up with a problem, which I can not seem to fix either with a module or by looking at ...
1
vote
1answer
39 views

trouble with hook_menu

I am trying to set up a new menu item in Drupal 7 and not having any luck. I've tried several examples and have been successful at this in the past, but this is just not working. The following code ...
0
votes
3answers
64 views

Drupal 7 - Add two menu items with the same path but different query string

On Drupal 7, there is a difficulty adding two or more items to a menu which are having the same URL but a different query string. For example, when I add two similar paths: ...
1
vote
1answer
40 views

Problem adding a tab to the user menu

I created a panel page using the Panels module, Contact list at the path messages/contact-list. The Privatemsg module causes several tabs (Inbox, Sent messages, All messages) to be displayed across ...
0
votes
1answer
33 views

Intermittent hook_menu error - call_user_func_array() expects parameter 1 to be a valid callback

As the title suggests I'm getting intermittent errors when hook_menu is called. Based on the error message it's as if the callback can not be found. Clearing the cache resolves the issue and the page ...
0
votes
1answer
34 views

Custom Menu Form Node Creation

I have been going over posts and examples for hours but finally need specific help on where my code is broken. I'm trying to create link in navigation that opens a form to create a new node. However ...
0
votes
0answers
13 views

Specifying the page URL for secondary language

I have a menu item added with hook_menu: $items[$word_page_path] = array( 'title' => 'Thank You Wall', 'page callback' => 'wow_page', 'access arguments' => array('access ...
0
votes
0answers
65 views

Function hook_menu() does not work: Callback function not found

I want to use the function hook_menu() for a custom menu item with following code: function custom_api_menu() { $items = array(); $items['new/task'] = array( 'title' => 'New task', ...
1
vote
1answer
25 views

how to alter main menu to add custom class

How do I add custom class to main menu. The main menu links are like Fashion, Art, Life and nodes being viewed category can be any one. I want to make the main menu item active as per node being ...

1 2 3 4 5 7
15 30 50 per page