The "page top" / "Back to top" button

  • I'd ideally like to have a "back to top" button visible in every post -- like a little arrow next to the "like" button. If anyone knows a way to do this then I'll be very grateful.


    Also, how would I get the current "back to top" button to appear on mobile devices?

  • Also, in addition to this, I'd love to know how to create either a floating "reply" or "back to bottom" button -- the current reply button only appears at the top, so there's no easy way to reply (without quoting) if you're halfway down the page.

  • I'd ideally like to have a "back to top" button visible in every post -- like a little arrow next to the "like" button.

    You can modify the threadPostList template to add the back to top button. Just add the code:

    Smarty
    1. <li><a href="#top" title="{lang}wcf.global.scrollUp{/lang}" class="button"><span class="icon icon16 fa-angle-up"></span></a></li>

    right after:

    HTML
    1. <ul class="messageFooterButtons buttonList smallButtons jsMobileNavigation">

    in that threadPostList template.


    Take note though that this will not function like the main back to top button - i.e. no smooth scrolling and is always visible.