back to top link

This one’s probably absurdly easy, but I haven’t figured it out yet.



I want to have a “back to top” link at the bottom of my pages, and I’ve created an anchor at the top of the page template for the link to refer to. Normally, I’d assign “#AnchorName” as the href for that link, but given the tag embedded in the page, that approach doesn’t work.



Does anybody have a quick answer for how to accomplish this?



Thanks!

You don’t need to assign an anchor. Return to top will do this for you because #top is already anchored to the top.

Matt, thanks so much for your input.



I have SEO enabled, and the meta.tpl file includes the following line:




This effectively prepends all "unqualified" link references with "http://216.55.155.249/" (for my developemnt site). Hence, any link whose href is just an anchor (e.g., "#top") gets that base prepended, which becomes "http://216.55.155.249/#top", no matter what page you're on in the site.

I think my options are to:

1. Remove the tag from the meta.tpl file, though presumably that line was originally added to the template to make the SEO stuff work, so I don't want to mess with that.
2. Generate the back-to-top link in the template using Smarty variables such as {$current_location} and {$current_url}, embedding the "#top" anchor accordingly.

I guess I figured someone else had dealt with this particular issue before. Does anyone have any additional input?