We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10405
    • 288 Posts
    As part of setting up an easy-to-use news publishing system for editors, I want them to have the ability to auto-publish the first few paragraphs of a news item (which they type into its own news page) to a front news page which has the first paragraph or two from various news articles, all brought together.

    So, if they write a new news article on its page, the first x paragraphs (probably 1 or 2) automatically fill up some space in a designated area on the front news page.

    This way they won’t have to copy or edit another page, move text around etc. and won’t need a publishing system as such (although they will need an easy to use "move to archive" system for the preceding / old news article.

    Can this be done?
      • 9207 ☆ A M B ☆
      • 2,475 Posts
      You can do this...and you can make it easy or make it hard... the easy way is to write your news pages in a dedicated folder, and on your summary page, use the Ditto Snippet to list the summaries of those pages (i.e. the introtext). So have the editors put the summary text into a separate field.

      The hard way to do this would involve crunching through the text in the content field and looking for valid paragraph delineators... it’s reinventing the wheel... can be done, but you’d probably need a really good reason to go that route. The Ditto approach is easier... take advantage of the summary field.
        • 10405
        • 288 Posts
        If I make a Ditto call from the place where I want to display the summary info, is there a parameter I can use to specify how much of the full article is included in the call, i.e how many words, sentences or paragraphs? That way I can set the value and the editor just needs to type their full article and not worry about which parts get included in the summary news item.
          • 15082
          • 195 Posts
          The summary extender might help you...
          http://www.pogwatch.com/ditto/ditto-extenders/ditto-summary.html

          Greetz
          JUSI
            • 10405
            • 288 Posts
            Yes, I tried that- but for some reason it doesn’t show the required number (or any) of characters in the article. I’ve tried this:

            [!Ditto? &documents=`180` &extenders=`summary` &truncLen=`200`!]

            But that is only displaying the title (which it’s turning into a hyperlink- which I don’t want)

            Also tried:

            [!Ditto? &documents=`180` &extenders=`summary` &trunc=`0`!]

            Which I thought would output the whole article just as a test, but that didn’t work either...
            ???
              • 9207 ☆ A M B ☆
              • 2,475 Posts
              is there a parameter I can use to specify how much of the full article is included in the call

              That’s requires more moving parts. Do you have a basic Ditto call working? You might want to first try the bare bones Ditto call, then see if you can list only the summary field, then if all that works, then try the extended functionality.