Tip: Display Articles in Multiple Pages

6 Comments

  • Jennifer Rowe
    Zendesk Documentation Team

    Thanks for posting this great tip, Diziana!

    0
  • Renato Lyke

    Thanks for the tip Diziana. Is it possible to add Next and Prev Buttons to the top hand side of the article. Like the one in the image.

     

    0
  • Diziana

    Hi Renato,

    It can be done by adding the following HTML snippet, just before the "pagged-view" wrapper.

    <ul class="pagination">
      <li class="prev"><a href="#">Prev</a></li>
      <li class="next"><a href="#">Next</a></li>
    </ul>
    
    
    

    So, new HTML for your article source code will be:

     

     `<ul class="pagination">
      <li class="prev"><a href="#">Prev</a></li>
      <li class="next"><a href="#">Next</a></li>
    </ul>
    
    <ul class="`  `pagged-view">
      <li `  `class="page">
        .....
        .....
      </li>
      ....
      ....
    </ul>` 
    
    

     

    In order to put the pre/next button towards left you need to update the css or you can do it by adding

    <ul class="pagination" style="float: right;">

    To the article HTML.

    Hope that will work for you.

    Let me know if you face any problem.

    Cheers,

    Diziana

    http://www.diziana.com/ 

     

     

    0
  • Renato Lyke

    Thanks Diziana. Will this work for the next article if i have it the same way it is in getting started section. Or do i need to add the links to each when i go to the page source.

    0
  • Diziana

    Hi Renato,

    You have to do it for every single article you add in order to show the pagination.

    However If you wanna show next/previous throughout your article then you have to add the following code into your article templete. 

    <ul class="pagination">
      <li class="prev"><a href="#">Prev</a></li>
      <li class="next"><a href="#">Next</a></li>
    </ul>
    
    

     

     

    Adding into your article templete will do the trick for all the article pages you have.

    Let me know if you face an issue.

    Thanks

    0
  • Michael Ogilvie

    Anyway to display the page information in the article title? and to disable the Prev or Next button if there is no page in that direction?

    0

Please sign in to leave a comment.

Powered by Zendesk