Jump to:

1851 Posts in 1606 Topics by 561 members

Blog Module

SilverStripe Forums » Blog Module » Why is "blog/post/" rendered by Page.ss in blog-0.2.0-rc1

Discuss the Blog Module.

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

Page: 1
Go to End
Author Topic: 1101 Views
  • volker
    Avatar
    Community Member
    4 Posts

    Why is "blog/post/" rendered by Page.ss in blog-0.2.0-rc1 Link to this post

    Hi,

    I've just noticed that in blog-0.2.0-rc1 the blog post request is rendered by the Page.ss template (this is done by the call to "return $page->renderWith('Page')" in the "post()" function in 'BlogHolder.php'). In blog-v0.1, posts were rendered by BlogHolder_post.ss. Intuitively I would think that having a separate template for post requests would make it easier for people to customize them. Perhaps the simplest solution would be to use the BlogHolder.ss template (just return "$page" in "post()") and disambiguate post requests through "<% if isPost %>" in the template. What do you think?

    In general I can live with any solution, I just would like to know which most likely will be the implementation in the final blog-0.2.0.

    Regards,
    Volker

  • Jona
    Avatar
    Community Member
    19 Posts

    Re: Why is "blog/post/" rendered by Page.ss in blog-0.2.0-rc1 Link to this post

    In v0.1, the address to a post is simply its name; there are no subdirectories in the address. If your blog is located at http://site.com/blog/ and you post an entry titled "mypost," then you should be accessing the entry at http://site.com/mypost, not http://site.com/blog/mypost/. I don't know if this has changed in v0.2, but SilverStripe appears to be very consistent in only having top-level addresses. Could this be your problem?

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