We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25483
    • 741 Posts
    I use this code to make a news page:
    [!Ditto? &parents=`7` &tpl=`Ditto_nieuws` &dateFormat=`%d/%m/%Y` &extenders=`@FILE assets/modules/yams/yams.extender.inc.php` &id=`(yams_id)_news` &language=`(yams_mname)` &summarize=`5` &paginate=`1` &paginateAlwaysShowLinks=`1`!]
    
    [+(yams_id)_news_previous+] [+(yams_id)_news_pages+] [+(yams_id)_news_next+]


    The news articles get shown, but the pagination doesn’t show up, does somebody know what’s wrong with the above code?
      with regards,

      Ronald Lokers
      'Front-end developer' @ h2o Media

      • 22851
      • 805 Posts
      I’d suggest removing the underscore from the Ditto id. An underscore is also used to separate the id from the placeholder so, depending on how ditto is coded this could confuse things. Other than that I don’t know what to suggest at the moment. I’ve compared it against a working YAMS + Ditto + pagination example and it all looks fine to me.
        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.
        • 25483
        • 741 Posts
        I changed the call to this and it’s still not working:
        [!Ditto? &parents=`7` &tpl=`Ditto_nieuws` &dateFormat=`%d/%m/%Y` &extenders=`@FILE assets/modules/yams/yams.extender.inc.php` &id=`(yams_id)` &language=`(yams_mname)` &display=`5` &paginate=`1` &paginateAlwaysShowLinks=`1`!]
        
        [+(yams_id)_previous+] [+(yams_id)_pages+] [+(yams_id)_next+]


        Is there a way to debug ditto so that I can see what parameters it gets?
          with regards,

          Ronald Lokers
          'Front-end developer' @ h2o Media

          • 22851
          • 805 Posts
          You could try setting [tt]&debug=`1`[/tt]. Not sure how or where it outputs the debug info though.
            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.
            • 25483
            • 741 Posts
            This is the output I get: http://testaccount01.medianerds.net/sma/evo/ditto-debug

            The strange thing is that the parameters are not shown!!


            /edit

            I did change my call to a cached one and know it works! But the links in the pagination are wrong, they are not changed by YAMS.

            This is the code I use now:
            [[Ditto? &parents=`7` &tpl=`Ditto_nieuws` &dateFormat=`%d/%m/%Y` &id=`en-nieuws` &language=`english` &display=`5` &paginate=`1` &paginateAlwaysShowLinks=`1` &extenders=`@FILE assets/modules/yams/yams.extender.inc.php`]]
            
            [+en-nieuws_previous+] [+en-nieuws_pages+] [+en-nieuws_next+]
            


            The problem is that it uses the modx variable "alias" instead of the languages alias, that way it get’s redirected to another page. Is there some way to fix this problem?
              with regards,

              Ronald Lokers
              'Front-end developer' @ h2o Media

              • 22851
              • 805 Posts
              Please see this other recent post on ditto and pagination for how to get the URLs working.

              Please could you tell me whether that document that your Ditto call is in is cacheable or uncacheable? It would be good to determine which particular combination of document and snippet, cacheable and uncacheable work.
                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.
                • 25483
                • 741 Posts
                The solution to make the links work right is not working, the problem is that the modx alias is the same for the documents. So now he just goes to another page which has the same [*alias*], while the alias at the language is filled in.

                Is it possible to change the output of the links by adding some code to the extender?

                To answer your question: the document itself is uncachable
                  with regards,

                  Ronald Lokers
                  'Front-end developer' @ h2o Media