We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12556
    • 103 Posts
    I’ve been following the Basic Blog tutorial on the MODx Wiki and it says to create a chunk to be used for Ditto’s tpl parameter that contains this:
    <h3>
    	<a href="[~[+id+]~]" title="[+title+]">[+title+]</a>
    </h3> <!-- link to blogs article with it's title (link is title) -->
     
    By <strong>[+author+]</strong>
    on [+date+].
    <a  href="[~[+id+]~]#commentsAnchor">
    	Comments ([[Jot? &docid=`[+id+]` &action=`count-comments`]])
    </a><!-- link to the article with comments form and comment count -->
     
    Summary: [+summary+]
    <br />
    Link: [+link+]
    

    ...and then in the actual blog document it said to put this:
    [!Ditto? &parents=`7` &summarize=`3` &total=`20` &commentsChunk=`blogComments` &tpl=`postSummary`!]
    

    ...but it’s not working as advertised.

    It will summarize the first three posts like it’s supposed to but it won’t display any of the others in an unsummarized format (which I assume should just be the title) and the ones that are being summarized are missing some content. It has the author, date posted, and number of comments but there’s no summary and no link, although I’m not sure what the link is even for since the title itself links to the article. Any help? Thanks in advance!
    Dave
      • 7231
      • 4,205 Posts
      By default Ditto only displays 3 posts, to get more (or less) you need to include the &display=`20` or to get all you can use &display=`all`. You don’t need the &total part (I have never used the total, will need too look it up).

      It is always good to keep the ditto support site handy: http://ditto.modxcms.com/files/snippet-ditto-php.html
        [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]
        • 12556
        • 103 Posts
        Thanks for the quick response! I did initially look at the Ditto documentation but didn’t find anything helpful, although I didn’t bother to look at the total and display parameters because I assumed that the tutorial had it right which isn’t a safe assumption with these tutorials it seems. I changed the Ditto snippet to include &display=`20` but it didn’t make a difference. sad
          • 4310
          • 2,310 Posts
          Did you remove
          &summarize=`3`
          from the call?
          I believe it’s a legacy parameter but may well be over-riding
          &display=`all`
          Worth a try wink
            • 7231
            • 4,205 Posts
            ..I didn’t bother to look at the total and display parameters because I assumed that the tutorial had it right which isn’t a safe assumption with these tutorials it seems.
            Sorry to say it isn’t safe to assume that at all. Some have been updated while others are in the que. It is a community driven wiki so participation is encouraged. On the bright side, an entirely new and improved web site is on the horizon that promises to have plenty of cool stuff (I have not seen it yet but I hear it will be quite a change and a lot effort is going into it).
              [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]
              • 12556
              • 103 Posts
              Yeah, there seems to be a lot of outdated information in the documentation and the wiki but it’s not a huge deal. The activity on these forums helps smooth out what would otherwise be a very steep learning curve because of said outdated information. Clearly the bulk of the work has gone into the CMS itself though. I’ve been very impressed with it thus far. I definitely don’t mind putting up with a little bit of frustration while learning to get around in this thing--I think it’s going to be worth it. I’ll probably never build another site without it.

              Back to the problem at hand: you are correct, sir--summarize WAS overriding the display parameter but display seems to do the exact same thing. If I set it to 20 it summarizes all of the test posts I created. If I set it to three it summarizes three of them and but doesn’t display the titles on any of the rest.
                • 36592
                • 970 Posts
                If you use [+summary+] in the Ditto template, you have to activate summary extender using &extenders=`summary`.