We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4429
    • 429 Posts
    this has been asked before, but the thread I looked at didn’t give the answer to my problem.

    How do i limit ditto outout to say 50 characters?

    Here is my call:

    [!Ditto? &startID=`6`&sortBy=`createdon`&summarize=`1` &total=`1`&tpl=`story_summary`!] 


    here is my &tpl:

    <h1>[+menutitle+]</h1>
    <h2>[+title+]</h2>
    [+content:notags:limit=`50`+]
    <p>[+introtext+]<a href="[~[+id+]~]">More >></a></p>


    I am sure it a very simple, but if someone could point me in the right direction, that would be great.

    Thanks
      • 4041
      • 788 Posts
      It would be well worth your time to download the zip attached to the first post here:

      http://modxcms.com/forums/index.php/topic,13533.0.html

      I think you are looking for the "Summary" Extender section
        xforum
        http://frsbuilders.net (under construction) forum for evolution
        • 4429
        • 429 Posts
        Quote from: Breezer at Mar 02, 2009, 09:56 AM

        It would be well worth your time to download the zip attached to the first post here:

        http://modxcms.com/forums/index.php/topic,13533.0.html

        I think you are looking for the "Summary" Extender section

        Thanks, but I read that before I posted. The bit i wanted has been replaced by the Summary Extender option. its not really beginner friendly, i’ve got no idea what code i need to put. I tried using &truncLen but that did not do anything.
          • 15152
          • 360 Posts
          c-m
          I use this on every site I build. Here is my actual Ditto chunk:
          <div class="ditto_summaryPost">
            <h5><a href="[~[+id+]~]" title="[+title+]">[+title+]</a></h5>
            <div class="ditto_info" >[+createdon:date=`%B`+] [+createdon:date=`%d`+], [+createdon:date=`%Y`+] | <a  href="[~[+id+]~]#commentsAnchor">Comments
            ([!Jot?&docid=`[+id+]`&action=`count-comments`!])</a></div>
              <p> [+summary:limit=`190`+] ... <a href="[~[+id+]~]">Go »</a></p>
          </div>
          <br clear="left" />


          The ’summary:limit=’ is where the characters get limited. One thing to note, it is all characters that are counted, even img code. You can go to my site to see it in action. I use this to keep the columns equal height: http://impress-design.com
            There are no boring projects. Only boring executions. ~ Etzkorn
            www.impress-design.com
            • 4429
            • 429 Posts
            Quote from: JWMSales at Mar 02, 2009, 10:40 AM

            c-m
            I use this on every site I build. Here is my actual Ditto chunk:
            <div class="ditto_summaryPost">
              <h5><a href="[~[+id+]~]" title="[+title+]">[+title+]</a></h5>
              <div class="ditto_info" >[+createdon:date=`%B`+] [+createdon:date=`%d`+], [+createdon:date=`%Y`+] | <a  href="[~[+id+]~]#commentsAnchor">Comments
              ([!Jot?&docid=`[+id+]`&action=`count-comments`!])</a></div>
                <p> [+summary:limit=`190`+] ... <a href="[~[+id+]~]">Go »</a></p>
            </div>
            <br clear="left" />


            The ’summary:limit=’ is where the characters get limited. One thing to note, it is all characters that are counted, even img code. You can go to my site to see it in action. I use this to keep the columns equal height: http://impress-design.com

            A bit lost on that - do I just add this as my chunk
              • 15152
              • 360 Posts
              In your chunk where you have: [+summary+] change it to: [+summary:limit=`50`+]
                There are no boring projects. Only boring executions. ~ Etzkorn
                www.impress-design.com
                • 4429
                • 429 Posts
                Quote from: JWMSales at Mar 03, 2009, 09:50 AM

                In your chunk where you have: [+summary+] change it to: [+summary:limit=`50`+]

                Thanks,

                I didn’t have [+summary+] i had [+introtext+] but i changed it and it works.