Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Create a new module that allows for help to appear in a modal frame instead of in a popup
Comments
Comment #1
robertDouglass CreditAttribution: robertDouglass commentedWe discussed this on the phone and the approach is to add a drupal_alter call to the $element that comes in when the links get made. This will allow the sub module or any other 3rd party module to react to the help link being added. In this case some JS is being added to hijack the display of the help text and put it into the modal.
Comment #2
e2thex CreditAttribution: e2thex commentedThe attached patch adds the drupal_alter to the help inject element alter.
It adds the following line
drupal_alter('helpinject_help_link_element', $element, $form_id);
Comment #3
e2thex CreditAttribution: e2thex commentedThe drupal_alter is now commit to 6.x
Comment #4
chrisschaub CreditAttribution: chrisschaub commentedBut does this approach work for the exported help? Or only for the help while it's being built. The drupal_alter is not exported in the module files, only in the forms when linking up the help. Which makes sense because helpinject does not run on the site after the help has been created.