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

    It seems that nothing i try can make pagination work.
    I went through the documentation and posts on this forum and tried everything i could find but no cigar.

    Ditto call runs as it should and displays the content but the pagination numbers don’t come up. I’ve already added (yams_id) prefix to all of the pagination placeholders like so:

    <p>
    [!Ditto?&id=`(yams_id)` &language=`(yams_mname)` &parents=`70` &depth=`0` &dateSource=`editedon` &sortBy=`editedon` &dateFormat=`&dateFormat=`%e %B %G` &truncText=`...` &tpl=`article_summary_en`  &paginate=`1` &display=`3` &extenders=`@FILE assets/modules/yams/yams.extender.inc.php`!] 
    </p>
    
    <p>Showing <strong>[+(yams_id)_start+]</strong> - <strong>[+(yams_id)_stop+]</strong> of <strong>[+(yams_id)_total+]</strong> Articles</p>
    <p>Pages: [+(yams_id)_previous+] [+(yams_id)_pages+] [+(yams_id)_next+] </p>


    there are 3 chunks: article_summary_en, article_summary_cs, and article_summary_ct.

    Any hints would be greatly appreciated.
      • 22851
      • 805 Posts
      Your code looks fine. I’ve set this up on both MODx 1.0.0 and MODx 1.0.2 and got it working - so I’m at a loss as to why it wont work for you.... Oh. Just noticed that I have &paginateAlwaysShowLinks=`1` in my ditto call. Could it be that?
        YAMS: Yet Another Multilingual Solution for MODx
        YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
        Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
        • 22840
        • 1,572 Posts
        If you don’t have the &paginateAlwaysShowLinks=`1` in the call it will only display the links when it has reached the limit on that page and the links are needed.
          • 22448
          • 241 Posts
          Thanks guys.
          So the issue is with how Ditto is called. If i call it cached ([[ ]]) then everything works like it should. But the uncached call ([! !]) does not return any pagination values. This happens regardless of whether the document is cacheable or not.
          Not sure what’s going on.
            • 22851
            • 805 Posts
            Quote from: outre99 at Nov 08, 2009, 02:52 AM

            Thanks guys.
            So the issue is with how Ditto is called. If i call it cached ([[ ]]) then everything works like it should. But the uncached call ([! !]) does not return any pagination values. This happens regardless of whether the document is cacheable or not.
            Not sure what’s going on.
            Sorry. Nor me. I have just checked out cacheable and un-cacheable versions and they work fine for me... I know that you updated to the latest version of YAMS recently. Is it possible that the YAMS plugin events were not correctly updated? YAMS 1.1.7 alpha RC7 needs to be active on:

            - OnLoadWebDocument
            - OnParseDocument
            - OnWebPageInit
            - OnWebPagePrerender
            - OnLoadWebPageCache
            - OnPageNotFound
            - OnBeforeDocFormSave

            and needs to be placed first in the plugin execution order for each of those events. That’s the only thing that I can think of at the moment that might be contributing to the problem.
              YAMS: Yet Another Multilingual Solution for MODx
              YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
              Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.