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   6032 Views

Avatar
SightUnseen

Community Member, 28 Posts

28 September 2009 at 6:37pm

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

Forum Moderator, 5513 Posts

28 September 2009 at 7:15pm

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

Avatar
SightUnseen

Community Member, 28 Posts

28 September 2009 at 9:01pm

Edited: 28/09/2009 9:01pm

Good to know before getting too far. Thanks.

Avatar
SightUnseen

Community Member, 28 Posts

13 October 2009 at 12:06pm

Edited: 13/10/2009 12:39pm

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

Community Member, 28 Posts

28 October 2009 at 11:26am

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

Avatar
Willr

Forum Moderator, 5513 Posts

28 October 2009 at 11:43am

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

Avatar
SightUnseen

Community Member, 28 Posts

28 October 2009 at 3:52pm

Edited: 28/10/2009 3:53pm

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

Community Member, 28 Posts

30 October 2009 at 1:35pm

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

Go to Top