Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Blog Summaries..


Reply

4 Posts   1650 Views

Avatar
cmstester

24 June 2008 at 12:01am Community Member, 15 Posts

On my main page here: http://cmstester.com/ you will see that my entries are squished up. I'd like them to show a bit more but i'm not sure how to expand them. This is the blog module I am using. It's showing only 10 articles per page which i am fine with but it's cutting them off too early and I'd like to show more text before the read more tag.

How can i fix that?

Avatar
cmstester

24 June 2008 at 3:16pm Community Member, 15 Posts

anyone?

Avatar
Willr

24 June 2008 at 4:47pm Forum Moderator, 5511 Posts

On the blogHolder template the summary is rendered as...

   <p>$ParagraphSummary</p>

which runs to BlogEntry->ParagraphSummary()

You could do a couple things to change it: 1) hack the ParagraphSummary() method to return any of the other Text Methods you can call - http://doc.silverstripe.com/doku.php?id=htmltext
or option 2 is to change the template to use one of the Text Methods instead (if you are not using BBCode that is)

$Content.LimitWordCount(50) <!-- Returns the first 50 words of the HTML from this field for example-->

If you are using BBCode then it might be a good idea to write you own method similar to the BlogEntry->ParagraphSummary()

Avatar
cmstester

25 June 2008 at 12:07am Community Member, 15 Posts

That worked perfectly, thank you will.