1

Since the paging buttons of a SharePoint blog are at the bottom of the page, users have to scroll down all the posts displayed if they want to see older posts.

How can I duplicate paging buttons to the top of the page so users can access it without having to scroll down ?

2

I wrote a little script using JQuery to duplicate paging buttons to a more convenient place. I tested it on SharePoint 2013, 2016 (ITPreview), Online (working at the time I write this answer).

1- About the blog site, disable "Minimal Download Strategy" feature from site feature management screen

2- Edit the top page of the blog and add a "script editor" webpart

3- Copy the following script into the newly added webpart and save the page

<script>


function CopyPaging()
{
    // Cloning pager
    var $cloned = $("[id^='scriptPagingWPQ']").clone();

    // Replacing all html id attributes and setting a few css properties to center the new pager
    $cloned.prop('id', 'newScriptPaging' );
    $cloned.find(".ms-bottompaging").prop('id', 'newBottomPaging').css("text-align", "center").css("width", "100%");
    $cloned.find(".ms-bottompaging>div").prop('id', 'newGUID');
    $cloned.find("[id^='bottomPagingCell']").prop('id', 'newBottomPagingCell');
    $cloned.find("[id$='prev']").prop('id', 'newPrev' );
    $cloned.find("[id$='next']").prop('id', 'newNext' );

    // Adding new pager to the page (at the bottom of the column on the right side)
    // You may want to choose another location
    $(".ms-blog-LeftColumn").append($cloned);
}

$(document).ready(function () {
    SP.SOD.executeFunc('sp.js', 'SP.ClientContext', CopyPaging);
});

</script>

Be Careful, you need to include JQuery for the script to execute (you can for instance include it into your masterpage or at the top within the script editor part)

Step by step guide here: http://sprecipe.com/2015/12/30/pimp-my-sharepoint-episode-2-duplicate-paging-buttons-to-avoid-long-scrolling-on-sharepoint-blogs/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.