1840 Posts in 1598 Topics by 557 members
|Go to End|
7 September 2012 at 4:53pm
Any suggestions for how to duplicate the functionality of BlogEntry->ParagraphSummary() in Blog0.6/SS3?
I use it to show the first paragraph of the latest blog entries on the site front page. At the moment I just have $ParagraphSummary in the template (within a BlogEntry loop).
7 September 2012 at 9:22pm
A number of other text operations (perhaps try FirstParagraph or ContextSummary) http://api.silverstripe.org/3.0/framework/model/Text.html
10 September 2012 at 12:09pm
Thanks for that tip. I replaced
<% with Content %>
<% end_with %>
That has the added benefit that authors can now include html in their initial text.
|Go to Top|