We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7291
    • 129 Posts
    Ditto &trunc cuts the content after periods, I’m after trunc at exact # of words, and found an older post that mentioned:

    http://wiki.modxcms.com/index.php/PHx/CustomModifiers#phx:word_limit

    I do not get how to include this in the Ditto call...this is what I have at the moment after trying numerous methods:

    [[Ditto? &tpl=`box2` &documents=`59` &extenders=`summary` &trunc=`1` &trunclen=`[+content:word_limit=`50`+]` ]]
    and in the chunk I use [+summary+] but think I would have to use content

    doesn’t work and tried many other combinations. How do I include: [+content:word_limit=`50`+] ?

    Alternatively Is there another way to trunc length at spaces between words instead of periods at the end of the sentence?

    Thanks a bunch
      [center]-- smiley --[/center]
      [center]New View Media - Custom Website Design[/center]
      [center]Custom Website Design & Marketing = Strategic Business![/center]
      • 19036
      • 119 Posts
      Hello,

      Look this topic:

      http://modxcms.com/forums/index.php/topic,24936.msg153193.html#msg153193

      the alternative of a new little snippet is much more easier

      Enjoy,
      Mehdi
        Scuse my english...I'm swiss
        • 7291
        • 129 Posts
        Thanks for the link but it’s not quite what I’m after since I will be using Ditto to bring images and such as long as the text etc...

        Think I found something:
        &truncAt - the split-point splitter itself [ <!-- splitter --> ]

        What else can I put in &truncAt=`?`

        Can’t find any documentation....there’s got to be a way to trunc ditto calls at spaces in between words instead of .periods which is all I currently get.

        Any options for &truncAt ?
          [center]-- smiley --[/center]
          [center]New View Media - Custom Website Design[/center]
          [center]Custom Website Design & Marketing = Strategic Business![/center]
          • 36592
          • 970 Posts
          Quote from: dhilden at May 10, 2008, 10:30 PM

          How do I include: [+content:word_limit=`50`+] ?
          I personally don’t like PHx so I have never used this, but I think you should put [+content:word_limit=`50`+] in your Ditto template box2. And you do not need to specify &trunc/&trunclen in your Ditto call. Instead you have to put &phx=`1`.

          Quote from: dhilden at May 13, 2008, 03:54 AM

          &truncAt - the split-point splitter itself [ <!-- splitter --> ]
          &truncAt specifies delimiter characters where you want to truncate text. It can be any characters you want, but you have to put these characters manually in all content fields.