By iokevins on
How might I add a "Back To Top" link in Drupal? My first stab:
<a name="top"></a>
...
<a href="#top">Back to top</a>
When I hover over the link "Back to top" it displays http://example.org/d/#top no matter what page I am on.
How do I get the name of the current page in Drupal? Has anyone else successfully gotten this to work in Drupal? This seems like an easy question, but did not find anything from my search in the Drupal forums.
Thank you for your time.
Kevin
Citrus Heights, CA
Comments
I Can Answer My Own Question
This worked for me:
<a href="/<?php print url($_GET['q'], NULL, NULL, TRUE); ?>#top">Back to top</a>"Extraordinary claims require extraordinary evidence"
-- Carl Sagan
Great tip. Thanks for
Great tip. Thanks for sharing this.
You are welcome
You are welcome :)
"Extraordinary claims require extraordinary evidence"
-- Carl Sagan
How Do I Add "Back To Top" Link?
Hi,
Please use this module: back to top module.
http://drupal.org/project/back_to_top.
It will works nice.