Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • ray59 Friend
    #143316

    Hi
    Not sure how to explain this, but want I want to do is to insert the word TOP in a small font in the
    footer, so when someone needs to go back to the top of the page, they don’t have to scroll they just hit the word top and that link does it automatically if this makes sense. Any ideas please

    Regards

    cjmicro Friend
    #313625

    you could add an anchor in the html of the template.

    templates/yourtemplate/index.php

    somewhere after the </head>
    <a name=”top”></a>

    then somewhere at bottom by footer where you want it
    <a href=”#top”>Top</a>

    There is probably some javascript too, but this should work.

    Cheryl

    ray59 Friend
    #313642

    Hi
    Thank you very much for your reply regarding this issue, couple more questions unfortunately as I new and learning as I go. Is it okay to insert this code at the head directly under <head> and
    secondly to insert the second part of the code between the two lines </div> and !–END: CONTENT– > as I think the text TOP is better suited at the bottom of the content and not in the footer. Am I also right in assuming that adding this code will allow me to add the text top to all pages of my site if I what’d to.

    Regards

    cjmicro Friend
    #313693

    <blockquote>Is it okay to insert this code at the head directly under <head></blockquote>

    AFTER the </head> as you do not want it in the head tags, just in the header part of the website, so somewhere by ja-header div.

    [QUOTE[secondly to insert the second part of the code between the two lines </div> and !–END: CONTENT– > as I think the text TOP is better suited at the bottom of the content and not in the footer. Am I also right in assuming that adding this code will allow me to add the text top to all pages of my site if I what’d to.</blockquote>

    Yes, you can put the second part whereever you want the “top” to show up, and it will show up on all your pages.

    Hope this works!

    Cheryl

    ray59 Friend
    #313708

    Hi
    Thank you very much for your post on my couple questions, I have inserted the code and it works very well but the only issue is the in the page url in the browser. Once I hit top and go to top of page it shows after .html#top if I don’t hit the text top and scroll back to the top of the page my url ends with .html, do you think the added #top will affect my seo friendly url’s ?.

    Regards
    Ray

    cjmicro Friend
    #313724

    Sorry Ray, I do not know this, but glad the link worked. Not sure a name works without the # but you could do a google search on page bookmarks or anchors and see if there is another way.

    Cheryl

    ray59 Friend
    #313757

    Hi
    Thanks for all your help on this issue,

    Regards
    Ray

    antoniu1 Friend
    #313759

    Trick might be to use href=”#page, not href=”#top

    Hope this helps,
    Tom

    ray59 Friend
    #313770

    Hi Tom
    Thanks for your reply I edited the code with page as you suggested, but when I hit the text TOP at the foot of the page I didn’t go to the top of the page as per the original code edit but worth a try.

    Regards
    Ray

    antoniu1 Friend
    #313776

    Replace this in your index.php

    <div id="footer">
    <a class="anchor" href="#page"></a>
    <jdoc:include type="modules" name="footer" />
    <jdoc:include type="modules" name="debug" />
    </div>

    and this in your css file:

    DIV#footer A.anchor
    {
    position: absolute;
    right: 5px;
    top: 20px;
    width: 30px;
    height: 5px;
    background: url(../images/anchor.png) no-repeat 0 0;
    display: block;
    text-decoration: none;
    }

    This should work. 🙂

    Cheers,
    Tom

    P.S. Of course, edit the code to your needs. I took this from my own website and pasted it here, as it works like a charm. 🙂

    ray59 Friend
    #313812

    Thank you for the new code but can I just check that I insert the the code in the index.php between
    <!–begin:footer–> and <!–end:footer–>

    One more question, can you confirm please that the other code that has to go into the css file, is to be put into the template.css, and where should I place it?

    Sorry to ask but I am still learning as I go here and and have almost reached the end of this site so don’t want to put codes in the wrong place!

    Regards
    Ray

Viewing 11 posts - 1 through 11 (of 11 total)

This topic contains 11 replies, has 3 voices, and was last updated by  ray59 15 years, 3 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum