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

    im still new to some of the elements of MODx and Especially Ditto, ive kind of cobbled together a Random case study generation section but i dont know how to truncate whats actually being presented.

    the reason i need to truncate it at a certain point is so that it will fit in a pre defined area with a more button to the rest of the case study.

    the call i have so far is...

    [[Ditto? &startID=`7` &tpl=`CaseStudy` &randomize=`1` &total=`1` &trunc=`1` &truncChars=`100`!]]

    with the tpl being

    <strong>[+pagetitle+]</strong>
    <p>[+content+]</p>
    <p><a href="[~[+id+]~]" title="[+link]+]">More...</a></p>

    the randomisation works fine, i just dont understand after much reading how to truncate and i dont want to use the summary field within modx

    thanks again
      • 36416
      • 589 Posts
      Quote from: Tyreal2012 at Sep 29, 2008, 10:55 AM

      the randomisation works fine, i just dont understand after much reading how to truncate and i dont want to use the summary field within modx

      If you don’t want to use summary extender, apply some of the standard or custom PHx string modifiers to the content field:
      http://wiki.modxcms.com/index.php/PHx#String
      http://wiki.modxcms.com/index.php/PHx/CustomModifiers#phx:word_limit
        • 30912
        • 463 Posts
        Thanks, ill look into these and let you know how i get on

        Edit: Worked like a Charm thanks Eol