Sorry if this has been answered before — the search function thinks my terms are too generic to return any results!
Is there a way to automatically generate a Back to Top link at the bottom of each topic in Web Help? I know we're advised to keep topics short, but some of ours just can't be helped, and it would be nice if the user had a quick way to get back to the beginning.
Auto-generate a Back to Top Link?
-
nickatwork
- Sr. Propeller Head
- Posts: 457
- Joined: Thu Sep 16, 2010 6:31 am
- Location: London
Re: Auto-generate a Back to Top Link?
Have a google for 'back to top javascript' - most likely what you are after. You should be able to add this code to your master page and that will place it on every page - though it would look a little weird if it was on a short page where it wasnt required, so maybe you could just drop the code on the pages that exceed a single page length.
Good luck.
Nick
Good luck.
Nick
Re: Auto-generate a Back to Top Link?
One of our help projects uses:
(You could use that as the href or as an onclick action.)
Code: Select all
javascript:window.scrollTo(0,0);Re: Auto-generate a Back to Top Link?
For a non-JavaScript solution, the pound sign denotes the start of the HTM page:
<a href="#">Top of page</a>
Good luck,
Leon
<a href="#">Top of page</a>
Good luck,
Leon
Re: Auto-generate a Back to Top Link?
Thanks for the suggestions!
So..... I'm not really savvy enough to delve into code, here. I like the sound of Leon's solution because it seems the simplest. But I think I'm doing it wrong: I switched to XML view and stuck it in the code just above the </body> tag, but nothing happened...
So..... I'm not really savvy enough to delve into code, here. I like the sound of Leon's solution because it seems the simplest. But I think I'm doing it wrong: I switched to XML view and stuck it in the code just above the </body> tag, but nothing happened...
Re: Auto-generate a Back to Top Link?
Enclose it in a <p></p> tag container:
<p><a href="#">Top of page</a></p>
Then Save.
<p><a href="#">Top of page</a></p>
Then Save.
Re: Auto-generate a Back to Top Link?
What happens if you have other bookmarks in that topic, including ones Flare would insert when you create a xref? Will having just the # in the href tag still work and go to the top of the page, or would it jump to the bookmark created by the xref (or toggle, etc.)?crdmerge wrote:For a non-JavaScript solution, the pound sign denotes the start of the HTM page:
<a href="#">Top of page</a>
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Re: Auto-generate a Back to Top Link?
The pound sign indicates to HTML an internal link.
* If a bookmark assignment follows the pound sign (#intro_section, #config_section, etc.), you jump to the bookmark.
* If nothing follows the pound sign, you jump to the top (effectively, a file refresh).
* If a bookmark assignment follows the pound sign (#intro_section, #config_section, etc.), you jump to the bookmark.
* If nothing follows the pound sign, you jump to the top (effectively, a file refresh).
Re: Auto-generate a Back to Top Link?
Fabulous — thanks!