We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29635
    • 361 Posts
    Forgive me if this has been brought up before, but has anybody noticed that if you set "total" to be a bigger number than the number of items available, Ditto whitescreen-of-deaths? Ie. if there are only 50 items to list and you call ditto with total=`100`... it’s no good.

    Story of my career, I’ve either found a bug or I’m just really bad at what I’m doing wink
      Need MODx Ecommerce? Try FoxyCart!
      • 18397
      • 3,250 Posts
      Quote from: Boby at May 18, 2006, 08:07 AM

      If I the folder has no subfolders or documents (nothing to show), the chunk is still shown but empty.

      Could you provide your snippet call and a screenshot of your document tree fully expanded so I can determine if this is a configuration issue or a problem with Ditto itself. Thanks.

      Quote from: The at May 18, 2006, 10:43 AM

      Forgive me if this has been brought up before, but has anybody noticed that if you set "total" to be a bigger number than the number of items available, Ditto whitescreen-of-deaths? Ie. if there are only 50 items to list and you call ditto with total=`100`... it’s no good.

      Story of my career, I’ve either found a bug or I’m just really bad at what I’m doing wink

      Yup, found a bug... sad

        • 30115
        • 8 Posts
        the French language for Ditto.

        Enjoy

        Tof
          • 22221
          • 283 Posts
          Quote from: tof at May 18, 2006, 03:55 PM

          the French language for Ditto.

          Enjoy

          Tof

          The zip file seems to be corrupted. See the Topic http://modxcms.com/forums/index.php/topic,4547.msg32920.html#msg32920 to have the French language file and a link to the snippet traduction on the Wiki.
            • 30115
            • 8 Posts
            Quote from: OncleBen31 at May 19, 2006, 02:48 AM

            Quote from: tof at May 18, 2006, 03:55 PM

            the French language for Ditto.

            Enjoy

            Tof

            The zip file seems to be corrupted. See the Topic http://modxcms.com/forums/index.php/topic,4547.msg32920.html#msg32920 to have the French language file and a link to the snippet traduction on the Wiki.

            Sorry, effectively the file is corrupted. I don’t know why but anyway the traduction in the topic http://modxcms.com/forums/index.php/topic,4547.msg32920.html#msg32920 is very good.
            Good job.
              • 3763
              • 155 Posts
              Hello!

              Quote from: Mark at May 18, 2006, 02:44 PM

              Quote from: Boby at May 18, 2006, 08:07 AM

              If I the folder has no subfolders or documents (nothing to show), the chunk is still shown but empty.

              Could you provide your snippet call and a screenshot of your document tree fully expanded so I can determine if this is a configuration issue or a problem with Ditto itself. Thanks.
              Here is the screenshot of my document tree. It’s the default MODx installation and I have added a new folder.


              However, I found out that the empty Ditto chunk is shown only if in a child document/folder the Ditto snippet is called again.

              For example:
              1. I add following to the "TEST TEST TEST" (ID=38)
              [[Ditto? &tpl=`DittoTemplate` &startID=`38` &summarize=`5` &descendentDepth=`0` &multiLevel=`1` &showPublishedOnly=`1` &showInMenuOnly=`1` &sortBy=`pub_date` &sortDir=`DESC` &trunc=`0` &trunLen=`300` &commentsChunk=`FormBlogComments`]]

              When I browse this page, I get a "No entries found." message, and that is correct. The folder is empty.
              Also if I add a Ditto call on the other documents.

              2. Now I add on my index page (ID=1) following snippet call to get latest messages posted in the blog:
              [[Ditto? &tpl=`DittoTemplate` &startID=`2` &summarize=`5` &descendentDepth=`0` &multiLevel=`1` &showPublishedOnly=`1` &showInMenuOnly=`1` &sortBy=`createdon` &sortDir=`DESC` &trunc=`0` &trunLen=`300` &commentsChunk=`FormBlogComments`]]

              Everything shows up good, except when it get’s to the other Ditto snippet calls, it interprets them somehow as posts.
              I get every time this in on the page:
              <div class="ditto_summaryPost"><h3><a href="[~~]"></a></h3><small></small><div></div><p></p><div style="text-align:right;">by <strong></strong></div></div>


              Mark, let me know if you need some more info or if I failed somehow on the snippet call.
              It’s no hurry to fix it now, my homepage is still (:() not ready.

              Thank you very much!
              Boby
                ...my Photo Gallery on Flickr...
                • 18397
                • 3,250 Posts
                At first glance I believe Ditto is indexing the folders as it is supposed to. Add this to your snippet call to remove the folders from view:

                &hideFolders=`1`
                


                Let me know if that works...
                  • 3763
                  • 155 Posts
                  Quote from: Mark at May 19, 2006, 09:11 AM

                  At first glance I believe Ditto is indexing the folders as it is supposed to. Add this to your snippet call to remove the folders from view:

                  &hideFolders=`1`
                  


                  Let me know if that works...
                  Hmmm, if I add &hideFolders=`1` to my index page, Ditto will get me just the parent document/folder (ID=2). It’s like if I’d add multiLevel=0.
                  I think the solution is to change the snippet a bit and let it make a blank output if there are no child documents/folders.
                  Can you tell me please where I can do this in the code? You don’t have to add it to the default snippet if you don’t want to.

                  Thank you!
                  Boby
                    ...my Photo Gallery on Flickr...
                    • 18397
                    • 3,250 Posts
                    Well, Boby the snippet is working exactly as it is supposed to. It is designed to show ANY subchildren when multilevel is on, whether they are documents or folders.

                    Can you add &debug=`1` and copy and paste the first portion (before the document data bits)
                      • 30115
                      • 8 Posts
                      Hello Mark

                      There’s a little problem in the Ditto snippet: the $paginateSplitterCharacter variable is not called by the paginate fonction and i think it’s not normal.

                      I think that the line

                      function paginate($start, $stop, $total, $summarize, $tplArchiveNext, $tplArchivePrevious, $paginateAlwaysShowLinks){


                      must be replaced with

                      function paginate($start, $stop, $total, $summarize, $tplArchiveNext, $tplArchivePrevious, $paginateAlwaysShowLinks, $paginateSplitterCharacter){


                      in the file ditto.class.inc.php

                      and for the same reason the line

                      $ditto->paginate($start, $stop, $total, $summarize, $tplArchiveNext, $tplArchivePrevious, $paginateAlwaysShowLinks);


                      must be replaced with

                      $ditto->paginate($start, $stop, $total, $summarize, $tplArchiveNext, $tplArchivePrevious, $paginateAlwaysShowLinks, $paginateSplitterCharacter);


                      in the snippet

                      Do you confirm, Mark ?

                      PS: Sorry for my english, but i’m french

                      This discussion is closed to further replies. Keep calm and carry on.