1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Back to Top

Discussion in 'Styling and Customization Questions' started by m3commish, Jul 6, 2015.

  1. m3commish

    m3commish Active Member

    I know there's some resources for accomplishing the 'back to top' in other ways, but was wondering how to accomplish putting a 'back to top' where the image shows. Thanks!

    top.png
     
  2. Russ

    Russ Well-Known Member

    Go to the post template

    find:

    Code:
          <div class="publicControls">
             <a href="{xen:link threads/post-permalink, $thread, 'post={$post}'}" title="{xen:phrase permalink}" class="item muted postNumber hashPermalink OverlayTrigger" data-href="{xen:link posts/permalink, $post}">#{xen:calc '{$post.position} + 1'}</a>
             <xen:hook name="post_public_controls" params="{xen:array 'post={$post}'}">
             <xen:if is="{$post.canLike}">
               <a href="{xen:link posts/like, $post}" class="LikeLink item control {xen:if $post.like_date, unlike, like}" data-container="#likes-post-{$post.post_id}"><span></span><span class="LikeLabel">{xen:if $post.like_date, {xen:phrase unlike}, {xen:phrase like}}</span></a>
             </xen:if>
             <xen:if is="{$canReply}">
               <xen:if is="{$xenOptions.multiQuote}"><a href="{xen:link threads/reply, $thread, 'quote={$post.post_id}'}"
                 data-messageid="{$post.post_id}"
                 class="MultiQuoteControl JsOnly item control"
                 title="{xen:phrase toggle_multi_quote_tooltip}"><span></span><span class="symbol">{xen:phrase multiquote_add}</span></a></xen:if>
               <a href="{xen:link threads/reply, $thread, 'quote={$post.post_id}'}"
                 data-postUrl="{xen:link posts/quote, $post}"
                 data-tip="#MQ-{$post.post_id}"
                 class="ReplyQuote item control reply"
                 title="{xen:phrase reply_quoting_this_message}"><span></span>{xen:phrase reply}</a>
             </xen:if>
             </xen:hook>
    
    Add this right above the </xen:hook>

    Code:
           <a href="{$requestPaths.requestUri}#navigation" class="item control">{xen:phrase go_to_top}</a>
    
    Result:

    Screenshot_1.png
     
    Mr Lucky, Amaury and m3commish like this.

Share This Page