We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33706
    • 51 Posts
    Hi.

    How can I list the first 30 charactrs of a document with the ditto snippet?

    Here is what I have tried so far, but without great success :

    [!Ditto? &startID=`52` &truncLen=`30` &tpl=`NewsChunk`!]


    And here is my NewsChunk :
    <li>
    <p><a href="[*id*]">[+menutitle+]</a></p>
    <p>[+summary+]</p>
    </li>


    I would like to get data from the content of the document, not the summary(introtext).

    Thanks.

    Michel.
      • 18397
      • 3,250 Posts
      Does Ditto 1.0.2 fix this?
        • 6777
        • 13 Posts
        It took me a while to work this out for myself. Not sure if you had found answer by now but here is how I got it working:

        [[Ditto? &startID=`2` &summarize=`2` &total=`22` &commentschunk=`Comments` &tpl=`nl_blog_home` &paginate=`0` &alwaysshow=`1` &trunc=`1` &truncSplit=`0` &truncLen=`50`]]


        The important varible is &truncSlit=`0`. By default this is set to `1` which it looks like it over-rides the truncation charactor settings, and uses some kind of default content splitting setting.

        Regards, happy modx’in.