BrowserCMS 3.0
The newly redesigned BrowserCMS 3.0 is an easy, affordable
way to control, edit, and organize website content.
require 'cms/data_loader' include Cms::DataLoader # Load up data that was created in load seed data migration Cms::UsersService.current = Cms::User.first(:conditions => {:login => 'cmsadmin'}) root_section = Cms::Section.root.first home_page = Cms::Page.first(:conditions => {:name => "Home"}) # Apply new templates to core pages home_page.template_file_name = "home_page.html.erb" home_page.hidden = true home_page.publish_on_save = true home_page.save! # Fill out a sample site map # Main Menu create_section(:docs, :name => "Documentation", :parent => root_section, :path => "/documentation") create_section(:downloads, :name => "Downloads", :parent => root_section, :path => "/downloads") create_section(:contribute, :name => "Contribute", :parent => root_section, :path => "/contribute") create_section(:support, :name => "Support", :parent => root_section, :path => "/support") create_page(:support, :name => "Support", :path => "/support", :section => sections(:support), :template_file_name => "sub_page.html.erb") create_page(:forums, :name => "Forums", :path => "/support/forums", :section => sections(:support), :template_file_name => "sub_page.html.erb") create_page(:docs, :name => "Documentation", :path => "/documentation", :section => sections(:docs), :template_file_name => "sub_page.html.erb") create_page(:api, :name => "API", :path => "/documentation/api", :section => sections(:docs), :template_file_name => "sub_page.html.erb") create_page(:downloads, :name => "Downloads", :path => "/downloads", :section => sections(:downloads), :template_file_name => "sub_page.html.erb") create_page(:gems, :name => "Building a Gem", :path => "/downloads/gems", :section => sections(:downloads), :template_file_name => "sub_page.html.erb") create_page(:contribute, :name => "Contribute", :path => "/contribute", :section => sections(:contribute), :template_file_name => "sub_page.html.erb") create_page(:github, :name => "Using Github", :path => "/contribute/github", :section => sections(:contribute), :template_file_name => "sub_page.html.erb") # Utility Nav create_section(:util, :name => "Utility Nav", :parent => root_section, :path => "/util_nav", :hidden => true) create_link(:home, :name => "Home", :url => "/", :section => sections(:util)) create_page(:demo, :name => "Demo", :path => "/util_nav/demo", :section => sections(:util), :template_file_name => "sub_page.html.erb") create_page(:contact_us, :name => "Contact Us", :path => "/util_nav/contact_us", :section => sections(:util), :template_file_name => "sub_page.html.erb") create_page(:about, :name => "About Us", :path => "/util_nav/about_us", :section => sections(:util), :template_file_name => "sub_page.html.erb") # Footer Nav create_section(:footer, :name => "Footer Nav", :parent => root_section, :path => "/footer_nav", :hidden => true) create_page(:demo, :name => "Site Map", :path => "/footer_nav/site_map", :section => sections(:footer), :template_file_name => "sub_page.html.erb") create_page(:contribute, :name => "Privacy Policy", :path => "/footer_nav/privacy_policy", :section => sections(:footer), :template_file_name => "sub_page.html.erb") create_link(:contact_us, :name => "Contact Us", :url => "/footer_nav/contact_us", :section => sections(:footer)) create_page(:our_office, :name => "Our Office", :path => "/footer_nav/our_office", :section => sections(:footer), :template_file_name => "sub_page.html.erb") # Marks sections as visiable to everyone Cms::Group.all.each { |g| g.sections = Cms::Section.all } # Populate the pages with some content. welcome_content = "
Thank you for trying out this demo site. BrowserCMS is a open source content management system, written in Ruby on Rails. It's designed to be approachable for non-technical users, while allowing designers and developers to productively create great looking sites which feature dynamic functionality
This demo site uses a theme (Blue Steel) with two templates (Home and Sub), along with a sample sitemap containing several pages and sections. The template shows how to use the core Template API, which allows designers to create maintainable pages with no limits on layout.
" create_html_block(:welcome, :name => "Welcome to BrowserCMS", :content => welcome_content, :publish_on_save => true) home_page.create_connector(html_blocks(:welcome), "main") login = "In order to create or edit content, you will need to log into BrowserCMS.
Enter the following:
Here is a list of some of the features that BrowserCMS sports.
The newly redesigned BrowserCMS 3.0 is an easy, affordable
way to control, edit, and organize website content.