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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Blog Module /

Discuss the Blog Module.

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

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


Go to End


2 Posts   2437 Views

Avatar
volker

Community Member, 4 Posts

7 January 2009 at 11:34am

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

Avatar
Jona

Community Member, 19 Posts

5 February 2009 at 1:41pm

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?