def create_blog_block_page
      page = Cms::Page.find_by_name(@blog.name) || Cms::Page.create!(
        :name => @blog.name,
        :path => "/#{@blog.name_for_path}",
        :section => @section,
        :template_file_name => "default.html.erb",
        :hidden => true
      )
      page.create_connector(@blog, 'main')

      create_route(page, "#{@blog.name}: Posts In Day",      "/#{@blog.name_for_path}/:year/:month/:day")
      create_route(page, "#{@blog.name}: Posts In Month",    "/#{@blog.name_for_path}/:year/:month")
      create_route(page, "#{@blog.name}: Posts In Year",     "/#{@blog.name_for_path}/:year")
      create_route(page, "#{@blog.name}: Posts With Tag",    "/#{@blog.name_for_path}/tag/:tag")
      create_route(page, "#{@blog.name}: Posts In Category", "/#{@blog.name_for_path}/category/:category")
    end
def create_blog_block_page
      page = Cms::Page.find_by_name(@blog.name) || Cms::Page.create!(
        :name => @blog.name,
        :path => "/#{@blog.name_for_path}",
        :section => @section,
        :template_file_name => "default.html.erb",
        :hidden => true
      )
      page.create_connector(@blog, 'main')

      create_route(page, "#{@blog.name}: Posts In Day",      "/#{@blog.name_for_path}/:year/:month/:day")
      create_route(page, "#{@blog.name}: Posts In Month",    "/#{@blog.name_for_path}/:year/:month")
      create_route(page, "#{@blog.name}: Posts In Year",     "/#{@blog.name_for_path}/:year")
      create_route(page, "#{@blog.name}: Posts With Tag",    "/#{@blog.name_for_path}/tag/:tag")
      create_route(page, "#{@blog.name}: Posts In Category", "/#{@blog.name_for_path}/category/:category")
    end
Following with the above example, the first page that is created is named 'MyBlog' and
 holds the Blog ContentBlock directly, not a portlet. Together with the 5 created routes,
 this page and its  ContentBlock handle different post listings (all posts, posts in year,
 month or day and posts by tag or category).