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.

Blog Module

Discuss the Blog Module.

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

Blog holder as home page?


Go to End
Reply

12 Posts   5949 Views

Avatar
SightUnseen

28 September 2009 at 6:37pm Community Member, 28 Posts

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.

Avatar
Willr

28 September 2009 at 7:15pm Forum Moderator, 5511 Posts

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

Avatar
SightUnseen

28 September 2009 at 9:01pm (Last edited: 28 September 2009 9:01pm), Community Member, 28 Posts

Good to know before getting too far. Thanks.

Avatar
SightUnseen

13 October 2009 at 12:06pm (Last edited: 13 October 2009 12:39pm), Community Member, 28 Posts

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.

Avatar
SightUnseen

28 October 2009 at 11:26am Community Member, 28 Posts

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

Avatar
Willr

28 October 2009 at 11:43am Forum Moderator, 5511 Posts

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

Avatar
SightUnseen

28 October 2009 at 3:52pm (Last edited: 28 October 2009 3:53pm), Community Member, 28 Posts

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.

Avatar
SightUnseen

30 October 2009 at 1:35pm Community Member, 28 Posts

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

Go to Top