Which is more efficient - hook_form_alter or hook_menu_alter - for replacing a single page?
Posted by jersu on October 31, 2008 at 5:57pm
I'm replacing a single page from a contributed module. The page is currently rendered with a call to drupal_get_form() from a path like foo/%node/bar
My first thought was to replace the page with hook_form_alter, unset the form elements, and replace with my own content. But I thought that would require a whole lot of preprocessing on the form that I would just discard.
So, my next thought was to just redirect the path to my own function with hook_menu_alter. But, is this less efficient because of the dynamic nature of the path?
I'm just curious if anyone has experience with this.
Read more