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.
By crashbdx on
Hi everyone,
i have a content type foo with 4 entries, when im on the detail page of foo_1 for exemple i have a link in my template to go to the contact form, how can i add a variable to this link like href="/contact?foo=foo_1 then get it in my contact form to know where it came from ?
Thanks in advance for the help :)
Comments
Try hook_link_alter
You can try to use hook_link_alter in your module. Check link and if it's 'contact page' add necessary options, see:
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Menu%21me...