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

    Hi everyone!

    Someone know how to increase the number of characters of "introtext" field ?

    I searched a reply via the forum without succes.

    Basically my fields "summary" should be able to display 400 characters and I reach only a maximum of 210.

    Would it be possible to change the maximum quota? If so by what means?

    Thank you in advance.

    Mehdi
      Scuse my english...I'm swiss
      • 33337
      • 3,975 Posts
      The "introtext" field is a textarea, and there is no limit of characters on it. You can add as many characters in it.
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
        • 19036
        • 119 Posts
        Ok thanks for your answer but that’s strange, because when I call it with [+summary+] to truncate it that bugs.

        I use a custom snippet to do it:

        [[truncate? &what=`[+summary+]` &len=`400`]]

        <?php
        /* ----------
        parameters:
        $what - text to shorten
        $len - desired length of the shortened text
           ---------- */
        if (strlen($what) > $len) {
          /* there is a point to truncate */
          $what = preg_replace('/^(.{' . $len . ',}? ).*$/is', '$1', $what) . '...';
        }
        return $what;
        ?>


        Something is wrong in it ?

        I appreciate your help.

        Mehdi
          Scuse my english...I&#39;m swiss
          • 33337
          • 3,975 Posts
          I think [+summary+] is placeholder for Ditto listings, you can directly use [+introtext+] or [*introtext*] for your custom snippet.

          If you are using with Ditto 2x, then make sure you add &extender=`summary` and see the extender’s parameters for setting up the truncate length.

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

            Digging the interwebs for #MODX gems and bringing it to you. modx.link
            • 19036
            • 119 Posts
            Yes it helps ! Thanks a lot
              Scuse my english...I&#39;m swiss