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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Blog Module /

Discuss the Blog Module.

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

Create Multiple Custom Blog Holder Templates?

Go to End

3 Posts   1778 Views


Community Member, 2 Posts

6 February 2013 at 12:39pm

Edited: 06/02/2013 12:40pm

I'd like to create multiple custom blog holder templates, so I don't want to necessarily use a modified file that I drop into my theme's /Layout directory.

Here's what I tried:

  • Creating a Blog Holder called "Superblog" in the CMS.
  • Creating a SuperblogBlogHolder.php file in /code with the following:

    class SuperblogBlogHolder extends BlogHolder {
    class SuperblogBlogHolder_Controller extends BlogHolder_Controller {

  • Creating in /Layout within my theme
  • Dropping in the theme's /templates directory with simply $Layout in the code

That definitely doesn't work. It loads Superblog, but with no styling or any of the custom stuff I added in the file

If I zap that file from /templates, Superblog loads with all the site's styling, but again none of the custom template code created in the .ss file.

So either way I'm not getting Superblog to load the custom template code. Am I headed in the right direction here, or am I totally off base? Thanks!


Community Member, 189 Posts

13 February 2013 at 2:14am

Is your "Superblog" page in the CMS page type set to Superblog Blog Holder or Blog Holder?


Community Member, 2 Posts

13 February 2013 at 2:44pm

Whoops - yep, silly mistake. I also hadn't set a CMS-friendly name in SuperblogBlogHolder.php - it was showing just as Blog Holder in the CMS, so I totally overlooked that it was there as an option.