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

    having a problem with truncation in Ditto. I have the following ditto call, but its not truncating the [+summary+] as it says it will on the ditto site.

    [[Ditto? &startID=`10`&sortBy=`createdon` &sortDir=`DESC` &dateFormat=`%d %b %Y` &summarize=`10` &paginate=`1` &paginateAlwaysShowLinks=`0` &hideFolders=`1` &tpl=`ditto_articles` &trunc=`1` &truncLen=`100` ]]

    Anyone spot the problem?

    Thanks
    André
      • 11316
      • 81 Posts
      here is what I used in my ditto call &extenders=`summary` - don’t know if it helps
        • 1512
        • 57 Posts
        hi gremlin,

        I’ve added that into my ditto call, but it still shows all the info (no truncation). For clarification, my ditto template is:

        <div class="article_row">
        <div class="article_image"><a href="/[~[+id+]~]"><img src="/[+article_thumb+]" alt="thumbnail" width="108px" height="74px" border="0" /></a></div>
        <div class="article_content">
        <div class="article_heading">
        <h2 class="article_title"><a href="/[~[+id+]~]">[+menutitle+]</a></h2>
        <div class="article_date">[+date+]</div>
        <div class="clear"></div>
        </div>
        <div class="article_body"><p>[+introtext+]</p>
        <a href="/[~[+id+]~]">mehr</a></div>
        </div>
        <div class="clear"></div>
        </div>
          • 11316
          • 81 Posts
          Try starting simple - use this [[Ditto? &startID=`10`&sortBy=`createdon` &sortDir=`DESC` &dateFormat=`%d %b %Y` &summarize=`10` &paginate=`1` &paginateAlwaysShowLinks=`0` &hideFolders=`1` &tpl=`ditto_articles` &extenders=`summary`]] (notice I removed the trunc part - let me know if it truncates your +content+ at all.
            • 11316
            • 81 Posts
            ok sorry just noticed - this parameter truncates your content not summary - I could not get it to truncate the introtext but it did the content - the content box was most used by my users rather than the introtext
              • 1512
              • 57 Posts
              Hi ryan,

              I made the changes to both the ditto call and the chunk, but it doesnt want to play ball. Still no truncation going on there.

              André
                • 36592
                • 970 Posts
                Quote from: andre at Apr 16, 2009, 11:24 AM

                <div class="article_body"><p>[+introtext+]</p>
                Replace [+introtext+] with [+summary+].