We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8960
    • 150 Posts
    I am using the following Ditto call to try and pull up a specific post:

    [[Ditto? &startID=`60` &summarize=`1` &total=`1` &tpl=`DittoHighlight` &truncLen=`10` &truncSplit=`0`]]


    But, Ditto says it (and about 50 other documents) doesn’t exist). This call will only work if I use startID=’2’ or ’14’ or ’15’. Another part of the problem is, even if I use the startID=’15’, document ID 15 iis actually a different document than the one Ditto chooses to pull up.

    I was using the Ditto that came with .95RC2, but upgraded to 1.1b2 in hopes this would fix the problem.

    BTW, my DittoHighlight template looks like this:

    <div id="highlight">
    <h1><a href="[~[+id+]~]">[+longtitle+]</a></h1>
    <div>[+content+]</div>
    <p>[+link+]</p>
    </div>


    Thanks. I’ll be happy to explain this differently if what I posted isn’t clear. Before anyone asks, my other documents I’m trying to call are just fine. I call easily pull them up in MODx using the ID in the URL (e.g. http://temple.campfiresites.com/index.php?id=60).
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Ditto will pull up and display summaries for documents inside the container document whose ID you give it, not of the document whose ID you give it.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 18397
        • 3,250 Posts
        You can call up a specific document using &documents in 1.1b2.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Ah, you guys are getting too far ahead of me! shocked
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 8960
            • 150 Posts
            Quote from: Mark at Nov 25, 2006, 12:40 PM

            You can call up a specific document using &documents in 1.1b2.

            Ah! That’s what I was looking for. Is there a complete list of the Ditto parameters? I’ve read the standard documentation, but this type of information didn’t seem to be included (or if it was, its description didn’t catch my eye).

            Thanks,

            Eric
              • 8960
              • 150 Posts
              I tried removing &startID and put &documents in its place, but it crashed due to a database error. Any documentation on using &documents?

              Thanks.
                • 18397
                • 3,250 Posts
                What was the database error and which version of MODx are you using?
                  • 8960
                  • 150 Posts
                  Quote from: Mark at Nov 26, 2006, 08:42 PM

                  What was the database error and which version of MODx are you using?

                  Running MODx 0.95RC2 & Ditto 1.1b2:

                  Here’s my Ditto call:
                  [[Ditto? &documents=`15` &summarize=`1` &total=`1` &tpl=`DittoHighlight` &truncLen=`10` &truncSplit=`0`]]


                  My DittoHighlight template:
                  <div id="highlight">
                  <h1><a href="[~[+id+]~]">[+longtitle+]</a></h1>
                  <div>[+content+]</div>
                  <p>[+link+]</p>
                  </div>


                  And the errors I received:
                  « MODx Parse Error »
                  MODx encountered the following error while attempting to parse the requested resource:
                  « Execution of a query to the database failed - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND sc.published=1 AND sc.deleted=0 ) AND (sc.privateweb=0' at line 3 »
                        SQL: SELECT DISTINCT sc.createdon,sc.id,sc.published FROM `MODX_DATABASE`.modx_site_content sc LEFT JOIN `MODX_DATABASE`.modx_document_groups dg on dg.document = sc.id WHERE (sc.id IN () AND sc.published=1 AND sc.deleted=0 ) AND (sc.privateweb=0) GROUP BY sc.id ORDER BY sc.createdon DESC
                        [Copy SQL to ClipBoard]
                   
                  Parser timing
                    MySQL: 	0.0191 s	(14 Requests)
                    PHP: 	0.1292 s	 
                    Total: 	0.1483 s



                  (I changed the name of my database in the code above to protect my site.)
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    That should be [!Ditto? &docID=`15` ... !] maybe?
                      Studying MODX in the desert - http://sottwell.com
                      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                      Join the Slack Community - http://modx.org
                      • 8960
                      • 150 Posts
                      Quote from: sottwell at Nov 27, 2006, 01:58 PM

                      That should be [!Ditto? &docID=`15` ... !] maybe?

                      Ok. I tried that and it returned a ’no entries found’. So, I tried &documents again and it gave me the parse error listed above, so I set it back to startID so the page will at least work for now (http://temple.campfiresites.com/index.html; FYI: the Ditto call on the site is everything in the light grey area just below the menu ’Directions & Times...’ ).

                      [!Ditto? &startID=`15` &summarize=`1` &total=`1` &tpl=`DittoHighlight` &truncLen=`10` &truncSplit=`0`!]


                      This is odd & frustrating, but I appreciate the help.