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.
We have a requirement to change the URI of the search page to something other than http://example.com/gsearch/.
Comment | File | Size | Author |
---|---|---|---|
#12 | google_appliance-dynamic_menu_item-2219513-12.patch | 11.69 KB | timwood |
#10 | google_appliance-dynamic_menu_item-2219513-10.patch | 11.79 KB | iamEAP |
Comments
Comment #1
jamsilver CreditAttribution: jamsilver commentedPatch attached.
Comment #2
jamsilver CreditAttribution: jamsilver commentedAdded features:
Comment #3
jamsilver CreditAttribution: jamsilver commentedComment #4
iamEAP CreditAttribution: iamEAP commentedThanks @jamsilver. This is definitely a common requirement that I'd like to support. I haven't found any issues in reviewing the patch; I'll test in simplytest.me and on our existing installation before committing.
Thanks for your contribution!
Comment #5
iamEAP CreditAttribution: iamEAP commentedOne thing that did come up in testing is that if you have both Core search and GSA enabled (and responding at /search), people will no longer be able to search for "node" or "user" because /search/node and /search/user correspond to core search callbacks.
I think that's a use-case we can call "unsupported," as long as we note it in the documentation / README.txt. While we're in there, we should update the README to reflect this new feature.
Comment #6
iaminawe CreditAttribution: iaminawe commentedI found this worked great if my path was just /search or just /internal but broken when I set it to /search/internal which is what I needed.
I submit a small addition to the above patch that will work for if you need to have two levels above the actual keyword being searched in the url.
Comment #7
iamEAP CreditAttribution: iamEAP commentedThat actually brings up a very good point. Rather than hardcoding it, as suggest by @iaminawe in #6...
We should adjust the page arguments based on the depth provided by the "drupal_path" variable. Should be pretty straightforward.
This is in addition to adding/adjusting details in the README.txt (#5).
Comment #8
iaminawe CreditAttribution: iaminawe commentedYes that makes more sense than hardcoding it iamEAP. Thanks
Comment #9
iamEAP CreditAttribution: iamEAP commentedHere's a re-roll of #3 against the latest codebase. Still need to add/update documentation and account for the page arguments (#7).
Comment #10
iamEAP CreditAttribution: iamEAP commentedAaand here's #9 with the dynamic menu arguments and documentation changes. Interdiff for the highlights.
@iaminawe or @jamsilver, would you mind testing and reviewing?
Comment #11
JuliaKoelsch CreditAttribution: JuliaKoelsch at Spry Digital, LLC commentedWe have applied this patch successfully, and it works great. Thank you!
Comment #12
timwoodRerolled patch file for version 7.x-1.13. Should probably be done for -dev, but this is what I was able to do for now.
Comment #14
iamEAP CreditAttribution: iamEAP commentedThanks all! Looks good and committed to 7.x-1.x-dev.