1770 Posts in 495 Topics by 531 members
Blog Module
SilverStripe Forums » Blog Module » Replacement for ParagraphSummary in SS3/Blog 0.6
Discuss the Blog Module.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 263 Views |
-
Replacement for ParagraphSummary in SS3/Blog 0.6

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).
cheers
bruce -
Re: Replacement for ParagraphSummary in SS3/Blog 0.6

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
-
Re: Replacement for ParagraphSummary in SS3/Blog 0.6

10 September 2012 at 12:09pm
Will,
Thanks for that tip. I replaced
$ParagraphSummary
with<% with Content %>
$LimitWordCountXML(40)
<% end_with %>That has the added benefit that authors can now include html in their initial text.
| 263 Views | ||
|
Page:
1
|
Go to Top |


