Jump to:

1856 Posts in 1610 Topics by 562 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: 1112 Views
  • volker
    Community Member
    4 Posts

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


    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.


  • Jona
    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?

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.