Linking back to the top of your page
If your website contains a number of very long articles or pieces of content, it's wise to include a back to the top link at the bottom of each page.
Getting ready
Open your Joomla! template's index.php
file. For the purposes of this example, we'll be using the rhuk_milkyway template, though the technique can be applied to any Joomla! template.
How to do it...
1. Search for the following snippet of code in your template:
<table class="nopad"> <tr valign="top"> <td> <jdoc:include type="component" /> <jdoc:include type="modules" name="footer" style="xhtml"/> </td>
2. Create an anchor called
top
above the line where the statement<jdoc:include type="component" />
is included in your page:<table class="nopad"> <tr valign="top"> <td> <a name="top"> </a> <jdoc:include type="component" /> <jdoc:include type="modules" name="footer" style="xhtml"/> </td>
3. Beneath...