We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33431
    • 29 Posts
    Hello  smiley,

    I would like Ditto to show say like the first 40 words for an article.

    With my Ditto Call I get a summary of about 12 words no matter what number I set &truncLen too undecided. So is &truncLen the right thing for summary word count? Or have I done something wrong or did I leave something out?

    [!Ditto? &id=`1` &tpl=`by` &parents=`15` &dateSource=`createdon` &sortBy=`createdon` &dateFormat=`%d.%b.%y` &trunc=`1` &extenders=`summary` &truncLen=`40` &paginateAlwaysShowLinks=`1` &summarize=`9` &paginate=`1`!]


    Thankyou from Josh
      • 33337
      • 3,975 Posts
      zeio, I think Ditto smartly look for the html tags and strip to the nearest one automatically. I think its causing the issue.

      Try with small words without any html tag and see what it outputs.

      Hope it helps.
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
        • 33431
        • 29 Posts
        Thankyou Zi,

        I don’t quite understand what you mean about html? In the html in the article, there is no
        etc coming for around a paragraph


        Example from first paragraph on one of my news articles: "released on the m"

        where the ’m’ is say word 12 on the summary, it was supposed to say ’market’ but got cut of on the ’m’ at word 12 when I had &truncLen set at 40

        Also, I dont know what the other trunc call: &trunc means, I have it set at 1 and it works, but I have no idea what the setting is for

        Thanks
          • 36592
          • 970 Posts
          Quote from: zeio at Dec 17, 2008, 12:22 AM

          So is &truncLen the right thing for summary word count?
          I think &truncLen specifies the character count, not word count, in [+summary+].
          http://ditto.modxcms.com/extenders/summary.html
            • 33431
            • 29 Posts
            Ah,

            Thanks Tkfm

            Thats it, its characters not words, thanks I set character count to 100 now and it is just right

            thankyou

            from Josh
              • 36416
              • 589 Posts
              Quote from: zeio at Dec 17, 2008, 02:25 AM

              Thats it, its characters not words, thanks I set character count to 100 now and it is just right

              Try this custom modifier:
              http://wiki.modxcms.com/index.php/PHx/CustomModifiers#phx:word_limit
                • 33431
                • 29 Posts
                Thankyou Eol,

                Having a word count instead of character count would be fantastic.

                I looked into PHX, the plugin and snippet set up looks very hard for me to comprehend how it is set up and how to make things work with it. PHX looks like it would need very advanced user knowledge