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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

Blog Summaries..


Go to End


4 Posts   2284 Views

Avatar
cmstester

Community Member, 15 Posts

24 June 2008 at 12:01am

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

Community Member, 15 Posts

24 June 2008 at 3:16pm

anyone?

Avatar
Willr

Forum Moderator, 5523 Posts

24 June 2008 at 4:47pm

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

Community Member, 15 Posts

25 June 2008 at 12:07am

That worked perfectly, thank you will.