Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This Drupal 7 function will allow you to use anchor names/fragments in your menu links. This functions goes in your template.php file in your theme directory. Remember to change THEMENAME to your theme's name.
@gilcreque

This comment has been minimized.

Copy link
Owner Author

gilcreque commented Apr 20, 2011

This works in concert with 2 other pieces. First it looks for Menu titles that have "Jump to Top". You can of course change this to what you need. Second it uses the anchor name/fragment id called top. In your html.tpl.php file add this right below the body tag: <a name="top" id="top"></a>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.