We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21417
    • 486 Posts
    Hello,

    Just wondering if someone can please point me in the right direction?

    In Modx Evolution 1.2.1 and EvolutionCMS 1.3+, how do I create next/previous links for blog posts (kind of like how WordPress next/previous links work)?

    I just want to be able to navigate posts in a particular parent folder by clicking next/previous links. I am talking about on the actual individual post page, not ditto pagination from a ditto menu.

    I found this by Jako but it says it does not work in 1.1+.
    https://github.com/Jako/PrevJumpNext

    I'd like to be able to template both the links, hiding (or greying out with a class) inactive links.

    Would greatly appreciate any help.

    Thanks.

    This question has been answered by pmfx. See the first response.

    [ed. note: nickf08 last edited this post 6 years, 4 months ago.]
      Web design Adelaide
      http://gocreate.com.au
    • discuss.answer
      • 23610
      • 37 Posts
      Hi. Try https://github.com/Phize/modx-evolution-snippet-doclink Old one but really good.

      It uses files in assets/snippets/doclink/templates for templates and it's really flexible. No issues with 1.2.1 and 1.3.6

      Sample call:
      [[DocLink?
      &template=`news`
      &style=`none`
      &sortBy=`pub_date`
      &sortDir=`DESC`
      &hideFolders=`0`]]

      You can also try DocLister addon called DLPrevNext https://github.com/AgelxNash/DocLister/blob/master/install/assets/snippets/DLPrevNext.tpl
        • 21417
        • 486 Posts
        Hi pmfx,

        Thanks so much for the help!

        DocLink worked really well for me in Evo 1.2.1. Its very easy to create new templates (I achieved something similar in WordPress recently but man o man is templating that convoluted, this was a piece of cake).

        The only thing I had to do was change the sort direction otherwise the next links were previous and the previous links were next (probably due to the order of the resources in the LHS tree) smiley

        This is the call I used:
        [[DocLink? &template=`custom` &style=`none` &sortBy=`pub_date` &sortDir=`ASC` &hideFolders=`1`]]


        When I setup a demo Evo 1.4 site I will try out DocLink first in that too, and if that doesn't work I will try DocLister (I didn't try DocLister today because DocLink worked so nicely).

        Many thanks for your help.
          Web design Adelaide
          http://gocreate.com.au