Jump to:

1844 Posts in 1600 Topics by 559 members

Blog Module

SilverStripe Forums » Blog Module » Blog holder as home page?

Discuss the Blog Module.

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

Page: 1 2
Go to End
Author Topic: 5838 Views
  • SightUnseen
    Avatar
    Community Member
    28 Posts

    Blog holder as home page? Link to this post

    Will setting a blog holder as the home page cause any issues? By default archives are listed off the blog holder page (although viewing archives doesn't function correctly at present); is it safe to assume these will still work with the holder as the site's home page?

    Thanks for any and all help.

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Blog holder as home page? Link to this post

    Should work fine. I do the same for my site (Home page is a blog holder)

  • SightUnseen
    Avatar
    Community Member
    28 Posts

    Re: Blog holder as home page? Link to this post

    Good to know before getting too far. Thanks.

  • SightUnseen
    Avatar
    Community Member
    28 Posts

    Re: Blog holder as home page? Link to this post

    A couple of further questions.

    Firstly, the Archives don't work - a 404 page is shown. Is this due to having the blog holder as the home page?

    Secondly, How do we show less than 1 month's entries on the home page? The site has up to 3-4 news stories a day added, and to show a whole month's entries would result in a huge home page. We'd like to keep 15-20 entries (perhaps a week?) on the front page if possible.

  • SightUnseen
    Avatar
    Community Member
    28 Posts

    Re: Blog holder as home page? Link to this post

    This is paginating to 10 entries, which works well. However any clues on the archives? Does this work on your site willr?

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Blog holder as home page? Link to this post

    SightUnseen - have a look at this ticket http://open.silverstripe.org/ticket/4165

  • SightUnseen
    Avatar
    Community Member
    28 Posts

    Re: Blog holder as home page? Link to this post

    willr - thanks for the link.

             ));
             
             if($isMonthDisplay) {
                $link = $container->Link() . $sqlResult['Year']. '/' . sprintf("%'02d", $monthVal);
             } else {
                $link = $container->Link() . $sqlResult['Year'];
             }
       

    are lines 99-106 in our install, which differ slightly from the original lines in the diff. I assume the following should work:

    Replace:

    $link = $container->Link() . $sqlResult['Year']. '/' . sprintf("%'02d", $sqlResult['Month']);

    with:

    $link = $container->Link($sqlResult['Year']. '/' . sprintf("%'02d", $sqlResult['Month']));

    Thanks for the help thus far too; appreciated.

  • SightUnseen
    Avatar
    Community Member
    28 Posts

    Re: Blog holder as home page? Link to this post

    Can anyone help? Tried the code, and it doesn't seem to work.

    5838 Views
Page: 1 2
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.