Jump to:

1835 Posts in 1139 Topics by 554 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: 5666 Views
  • 3 midgets In a man suit
    Avatar
    Community Member
    13 Posts

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

    Well I am having a similar issue so instead of starting a new thread figured I would post it here.

    on my site 2branson.com I have a blog holder as the home page but all of the tags and anywidget links show up as 404

  • Filtre_
    Avatar
    Community Member
    1 Post

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

    My blog was set as homepage and caused the same issue: all of the tags links would come out as 404

    Here is how I fixed it:

    BlogEntry.php

    'Link' => $this->getParent()->Link() . 'tag/' . urlencode($tag)
    changed to:

    'Link' => $this->getParent()->Link() . 'home/tag/' . urlencode($tag)

    In TagCloudWidget.php
    "Link" => $blogHolder->Link() . 'tag/' . urlencode($tag)

    changed to
    "Link" => $blogHolder->Link() . 'home/tag/' . urlencode($tag)

    where "home" is the page name of startpage i.e. the blog

    @3 midgets In a man suit
    I can see that it would work on your site, too:

    http://2branson.com/tag/don+solice

    http://2branson.com/home/tag/don+solice

  • SightUnseen
    Avatar
    Community Member
    28 Posts

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

    Filtre_, thank you for this; pointed us in the right direction too.

    http://crew.org.nz/2009/11

    http://crew.org.nz/home/2009/11

  • DsX
    Avatar
    Community Member
    178 Posts

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

    thanks Filtre_ just what I was looking for... I had noticed that adding the home to the url worked, but had not a chance to look into the code.. you have saved me some time ;)

    any outstanding issues once this change is made?

    [Updated]
    Ok, after some messing, I have found that it seems better to create a redirector page that is labelled as home (not shown in menu) that redirects to your blog page.
    This way I haven't needed to edit any of the widgets as show previously.
    Not sure if I will suffer any performance loss due to the redirect, but for my purposes this seems to be the more manageable solution.

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