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.
If you go to http://example.com/ the 'skip navigation' link will have as its URL http://example.com/node#nav Since Global Redirect will transfer viewers to http://example.com/ and won't preserve the anchor.
Comments
Comment #1
mchelensubscribing
Comment #2
sillygwailoThe solution here is probably just to remove the
url()
call altogether and be satisfied that whatever page visitors end up with will have an anchor to somewhere on the current page.Comment #3
ishmael-sanchez CreditAttribution: ishmael-sanchez commentedIf you are just trying to fix this on the homepage try wrapping the anchor in an if statement like
if (!$is_front):
Or you could try building the anchor using the l function
print l(t('skip to navigation'), '<front>', array('fragment' => 'nav'));