We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1473
    • 18 Posts
    How have I do "Read more". I can fill form Summarty (Introtext) and tehn content, bud my site dont show perex, but only full text - artikel. I want have short prex (introtext) first, than "read more" and after click full text.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You will need to create a chunk for Ditto to use as a template for its output. The chunk would look something like this:
      <h2>[+longtitle+]</h2><p>[+introtext+] <a href="[+url+]">read more...</a></p>
      

      Then in your snippet call add &tpl=`chunkName`
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 1473
        • 18 Posts
        I understand - i create chunk, but where i Give chunk? I add it to folder: manage resources - - new chunk and what then? I use it in somewhere in artikle (This is also the possible? ) or I add it to template? And where in template?
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Tell Ditto to use it by adding &tpl=`chunkName` in the Ditto call.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 1473
            • 18 Posts
            I dont understant (sorry my English is not good)... new chunk, For example named "read-more" add somewhere to Ditto? Where exactly?
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              [[Ditto? &parents=`5` &tpl=`read-more`]]
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org