Previous and Next article navigation


39 댓글

  • Brett Bowser
    Zendesk Community Team

    Excellent news Rachel :)

    Happy to hear you were able to get it all sorted out!

  • Victoria Campagna


    Is there any way to have Previous and Next appear on articles within only one specific section?  I want them to appear within one section, but no where else.

    Thanks in advance for the help,


  • Nerea Garcia Ramila

    Hi Is there a way to have the 'next' button on the right hand side of the article instead of next to the 'prev' button?

    Thanks in advance

  • Brett Bowser
    Zendesk Community Team

    @Victoria and @Nerea this would require some custom code on your end to change where these buttons are located.

    While I'm not able to assist with any sort of custom coding, we do have some documentation available that you may find useful:

    I hope this helps point you in the right direction!

  • Ho Chan

    Rachel Roberts I'm having the same issue when adding the code in. It doesn't seem to pick up the URL of the next article and I'm left with just a "#" as a link. How did you fix it?

  • Frances Ramos


    I tried using this code. It actually works for section articles only but not for the subsection articles. Is there a way to customize the code so that the Previous and Next buttons would work on both section and subsection articles?

  • Brett Bowser
    Zendesk Community Team

    Hey Frances,

    Did you have any luck getting the Previous and Next buttons working on subsections? I wasn't able to track down anything on my end but wanted to see if you had any follow-up questions.

    Let me know!

  • Frances Ramos

    Hey Brett,


    Sorry for the late reply.

    Unfortunately, there's still no way for me to use the buttons on subsections.

    For your reference, this is the code that I used:

    $(document).ready(function() {
    var _location = $(".breadcrumbs li:nth-child(3) a").attr("href").split('/en-us/');
    var _split = _location[1].split('-')[0];
    var secId = _split.split('/')[1];

    $.getJSON('/api/v2/help_center/en-us/sections/'+secId+'/articles.json', function(data) {
    // change en-us to your Help center lang

    console.log(data);// intialize list
    var output = "";

    for (var i in data.articles) {
    output += "<li >";
    output += "<a id='id-" + data.articles[i].id + "' href = '" + data.articles[i].html_url + "'>" + data.articles[i].title + "";
    output += "</li>";
    $("#articles ul").append(output); // append li
    $("#articles ul").append('</ul>'); // close list
    var prev = $('#id-{{}}').parent().prev().find('a').attr('href');
    var next = $('#id-{{}}').parent().next().find('a').attr('href');
    $('.article-head a:first-of-type').attr('href',prev);
    $('.article-head a:last-of-type').attr('href',next);

  • Piers MacDonald

    The original solution from 3 years ago doesn't work (I get the same "greyed out" links that others have reported) and the latest posts are all snippets

    I'm not able to piece a solution together.

    Is someone able to summarize an up-todate how-to fir a user, with the Copenhaggen theme active, could add prev/next links? What snippets go in what files etc?


댓글을 남기려면 로그인하세요.

Zendesk 제공