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

    Not sure of the right words here.

    I have a chunk which looks a bit like
    <li class="tablist" onclick="self.location.href='[[~[[+id]]]]?ap=1';" title="[[+pagetitle]]">
        <h3>[[+pagetitle:truncateTitle]]</h3>
        <p class="description">[[+introtext:truncate]]</p>
      </div>
    </li>
    ​


    Everything if OK when it is a straight replace eg [[+pagetitle]] gets replaced with the correct place holder, but I want to truncate the description and the title. I have found the modifiers :truncateTitle and :truncate in use in other parts of Modx. But I can not work out how to set them up in my own snippits.

    Any suggestions where I should look?

    For info this is from a custom query.
      • 22295
      • 153 Posts
      see http://rtfm.modx.com/display/revolution20/Input+and+Output+Filters
      you can use :limit or :ellipsis, or simply create your own filter.