Jump to:

1835 Posts in 1139 Topics by 554 members

Blog Module

SilverStripe Forums » Blog Module » Modifying blogholder content

Discuss the Blog Module.

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

Page: 1
Go to End
Author Topic: 1202 Views
  • feef
    Avatar
    Community Member
    19 Posts

    Modifying blogholder content Link to this post

    I'd like to modify the Blogholder page.

    Either to display the latest blog entry in full.
    Or
    Display the latest entry in full, but leave the rest of the list of entries in their summerised format.

    Alternatively, is it possible to change the navigation name of a virtual page? Then I could make a virtual page show the latest blog post in full, and turn the standard blogholder into a blog 'archive'.

    The site is a work in progress:
    http://kickingtyres.customer.vehentis.co.uk

    I'm working on getting the blog content, image content and site structure sorted before I start populating the rest of the site or start playing with themes

    tia

    a

  • Bruce B
    Avatar
    Community Member
    145 Posts

    Re: Modifying blogholder content Link to this post

    Try the following. It might give you a starting point.

    Duplicate templates/include/BlogSummary.ss and rename it BlogFull.ss
    In your new file replace $ParagraphSummary with $ParsedContent
    In templates/Layout/BlogHolder.ss, change 'include BlogSummary' to 'include BlogFull'

    Your new BlogHolder page should now display full entries rather than summaries. You can control the number by changing <% control BlogEntries %> to <% control BlogEntries(5) %> or whatever number you want.

    good luck!

  • feef
    Avatar
    Community Member
    19 Posts

    Re: Modifying blogholder content Link to this post

    That worked perfectly. Thanks!

  • feef
    Avatar
    Community Member
    19 Posts

    Re: Modifying blogholder content Link to this post

    It works, but I've spotted a small issue with the links at the bottom.

    It shows the complete blog post as I wanted, but the links at the bottom of the page (1234 Next) still operate as if it had been a summary listin and are, therefore, jumping 10 blogs each time that link is clicked.

    I've found a reference to the BlogEntries.NextLink in BlogPagination.ss which creates the link, but can't find where the count of posts in each page is set.

    It would be nice to have the link state the blogpost title of the preceding or following blogpost, but just a newer/older link would be fine.

    Any pointers? Can't find the4se refernces in the code

  • Bruce B
    Avatar
    Community Member
    145 Posts

    Re: Modifying blogholder content Link to this post

    You could add:
    BlogTree::$default_entries_limit=5;
    to your _config.php file
    (I'm currently running SS 2.4 with Blog 0.4 so this may not apply to older versions)

    but your problem is that your later pages are probably jumping by 10. Its just the first page that has a single entry. I thought I had an answer somewhere but it seems to have disappeared.

    1202 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.