Monday, May 25, 2009

How to integrate Comatose CMS in your rails application.

Comatose CMS Yet another Micro CMS, when your client may use to create and edit easily a static pages like privacy policy, terms & conditions, an FAQ, that kind of thing.

Installation of Camotose.
$ ./script/plugin install git://github.com/darthapo/comatose.git
$ ./script/generate comatose_migration
$ rake db:migrate

Once the above mentioned command is executed then configure your route file, at the bottom of your route file paste the below mention syntax
map.comatose_admin
map.comatose_root ''

That it now you to access the Camotose simply type
http://localhost:3000/comatose_admin

You can configure you comatose on your config/environment.rb file, but i'll suggest you to create a comatose.rb inside your config/initializers folder, and insert the following code.

Comatose.configure do |config|
config.admin_title = 'YOUR site name CMS SYSTEM' # it cab anything...
config.admin_helpers = []
config.admin_sub_title = 'Administration Pages'
config.content_type = 'utf-8'
config.default_filter = ''
#config.default_processor = :liquid
config.default_tree_level = 3
config.disable_caching = false
config.hidden_meta_fields = 'filter'
config.helpers = []
config.includes = []
# These are 'blockable' settings
config.authorization = Proc.new { true }
config.admin_get_author = Proc.new { request.env['REMOTE_ADDR'] }
config.after_setup = Proc.new { true }

# Includes AuthenticationSystem in the ComatoseAdminController
config.admin_includes << :authenticated_system

# Calls :login_required as a before_filter
config.admin_authorization = :login_required

end

1 comment:

Jaz said...

Even for those who are not as internet-savvy, it is easy to use an open CMS for your daily tasks.