I am developing an application based on Drupal 7 and web services. Some application pages have a menu which should be customized (menu items should be removed) based on the response from the web service, but am not sure on how should implement it.
In general the logic is the following: I will get a parameter from the request and call the web service with PHP (I know how to do this). Then, based on the response, I should show or hide some menu items.
The problem is that the menu should be customized in every request, so hook_menu_alter
does not help me, because it is only called once when the menu is created. Is there another hook that I should be looking into, or any other method I should be using?