I would like to open a jquery dialog that asks a question before taking the user to the desired page (ie do some page set-up before they get there). The catch here is that I would like to open the dialog when the user clicks the menu item. I am not sure how to go about this. Could someone point me to some examples where this is done or what I need to do? I am using Drupal 7.


  • there is a module which might be helpful - drupal.org/project/modal_forms – Jack-PL Apr 29 '13 at 19:15
  • Thanks for the link to that project it looks like I could use on a future project, but for the a current project that I am working on now I would like to do it programmatically. – user5013 Apr 29 '13 at 19:21
  • I've got something like that. I did it with the help of MYTHEME_menu_link__menu_my_menu($variables) there I customized the link behavior to open the dialog – Jack-PL Apr 29 '13 at 19:31
  • try ctools module – Aboodred1 Apr 29 '13 at 20:22
  • Hi, can you provide a sample code :) . – Oleg Videnov Oct 13 '13 at 12:45

You can use dialog ui or colorbox, just attach this scripts to the page and add custom click event for menu item to open popup. Or you can use ctools but it's more complex.

|improve this answer|||||

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.