Is it possible to put callback function here $items['callback?'] ? I need to change this field every time when user make some changes. The biggest problem for me is that hook_menu() is cached and menu is rarely updating.


Technically, you can use a function to return an array of menu router items but practically it will not work because of caching.

However you can register wildcats paths like companies/so your page callback will be fired on every companies/ pages.

To do so, set the key of the $items like this:

$items['companies/%'] = array(...menu router info here ...);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.