We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11190
    • 109 Posts
    Hello, all. I’m sure this is something I’m doing wrong and not a Ditto bug but I can’t figure it out. I have two different Ditto calls referencing the same blog repository. One goes on the main page margin and is very short. The other goes on an expanded summary blog page. Because of the differences in displayed summary text, I am not using [*infotext*] but rather the summary extender. I’m am using MODx 0.9.6 on Ubuntu 7.0.4 (Feisty) with apache 2.x and viewing with Firefox 2.0.0.4.

    The extended summary is working as expected. Here is the call:
    [!Ditto? &tpl=`BlogListLong` &parents=`33`&display=`6` &noResults=`No thoughts have been posted yet` &paginate=`1` &extenders=`summary` &truncLen=`600` !]

    and here is the template:
    <h3><a href="[~[+id+]~]">[+pagetitle+]</a></h3>
    <p>by [+author+] on [+date+]</p>
    <p>[+summary+]
    [+link+]</p>
    <p></p>

    However, I have two problems with the short summary. First, it truncates in the middle of words rather than at word borders. In both cases I have taken the default &truncOffset=`30`.

    Second, it insists on placing a extra new line between the [+summary+] and [+link+] which makes it visually confusing, i.e., does "Read more . . . " refer to the item above or below. It does not do that with the long version. I did try changing the size of my left margin just in case it was a justification issue but it made no difference. Here is the short summary call:
    [!Ditto? &parents=`33` &tpl=`BlogListShort` &noResults=`No thoughts have been posted yet` &paginate=`1` &extenders=`summary` !]

    I tried this initially with &truncLen=`200` &truncOffset=`20` but reverted to defaults when it gave me the behavior I am describing. Here is the template:
    <p><a style="font-size:large;font-weight:bold" href="[~[+id+]~]">[+pagetitle+]</a>

    by [+author+] on [+date+]</p>
    <p>[+summary+][+link+]</p>
    <p></p>

    The only other difference between the two is that the longer version is in a document in the content section whereas the shorter version is in a document template outside of the content area.

    Any idea why I am getting such inconsistent results, i.e., truncating in the middle a word and an extra line before [+link+]? Thanks - John
      http://www.spiritualoutreach.com
      Making Christianity intelligible to secular society
      • 18397
      • 3,250 Posts
      Could you please do the following to attach the debug output to your post:
      Append &debug=`1` to the call
      Click "Save Debug Console"
      Rename the extension to .html
      Attach to the post
        • 11190
        • 109 Posts
        Thanks. I’ve attached the debug console except the forum would not accept .html so I renamed it to .txt - John
          http://www.spiritualoutreach.com
          Making Christianity intelligible to secular society
          • 11190
          • 109 Posts
          I tried playing around some more with the difference between the two pages. It does not seem to make a difference. If I use the short template on the expanded page within the document’s [*content*], it works fine. If I use the long template in the document template’s left margin, I get the same results. Even if I change &truncLen to be the same, I still get truncation in the middle of a word and an uncontrolled new line between [+summary+] and [+link+]. Any idea?

          Also, as I raised in another post, I’m having a problem with Ditto output and the page background graphic. It’s as if the page does not recognize the length of the Ditto output when calculating how many times to repeat the image. If the Ditto output in the margin is longer than [*content*], the image does not repeat and I have ugly white space at the bottom of the page. Again, any ideas on how to fix this? Thanks, all - John
            http://www.spiritualoutreach.com
            Making Christianity intelligible to secular society