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?
-
☆ 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.
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.
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...
???