Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Blog Summaries..

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

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

Page: 1
Go to End
Author Topic: 1624 Views
  • cmstester
    Avatar
    Community Member
    15 Posts

    Blog Summaries.. Link to this post

    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?

  • cmstester
    Avatar
    Community Member
    15 Posts

    Re: Blog Summaries.. Link to this post

    anyone?

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Blog Summaries.. Link to this post

    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()

  • cmstester
    Avatar
    Community Member
    15 Posts

    Re: Blog Summaries.. Link to this post

    That worked perfectly, thank you will.

    1624 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.