We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7767
    • 5 Posts
    Hello
    I have this ditto call with pagination, and it works fine, but I was wondering if it’s possible to add pagination/navigation with previous/next buttons to the &tpl chunk.
    This means if I click on one item on the list to read its full content, I would like to have a previous/next buttons in order to go to the next article without having to go back to the list of articles (the below ditto call)
    Any help would be greatly appreciated.

    [[Ditto? &parents=`55` &display=`1` &tpl=`articles`&orderBy=`createdon DESC` &extenders=`summary` &tplFirst=`first_article` &paginate=`1`&paginateAlwaysShowLinks=`1`]]
    <p>&nbsp;</p>
    <div id="navigation_controls">
    <div id="navigation-controls_previous">[+previous+]</div>
    <div id="navigation_controls_page_info">[+currentPage+] / [+totalPages+]</div>
    <div id="navigation_controls_next">[+next+]</div>
    </div>
      • 7231
      • 4,205 Posts
      There is a snippet PrevJumpNext that can do this: http://modxcms.com/extras.html?view=package/view&package=351
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don&#39;t know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 7767
        • 5 Posts
        Thanks!!!!
        The only thing is that the snippet didn’t work that well, and I had to add a / to the beginning of each URL the snippet outputs (ie. <a href=’/[~somemodxshithere~]’>
        I also changed another line to omit the 4th parameter to getActiveChildren

        thanks again for your help! smiley