Sha256: c4f6a4c5715e46c2f7af96caaf9df7ab23810b9aa41480ce196f1083c08b8652
Contents?: true
Size: 1.7 KB
Versions: 4
Compression:
Stored size: 1.7 KB
Contents
= EcmCmsCore = Purpose Create and administrate pages in active admin and display them in your ruby on rails applictation. = Features * Drop in module for active admin. * Textile support. * I18n support. * Meta tags from the db. * Titles from the db. = Installation Add it to your gemfile: gem 'ecm_cms_core' Install your bundle: > bundle install Install & run migrations: > rake ecm_cms_core_engine:install:migrations > rake db:migrate Create a frontend controller (app/controller/frontend_controller.rb): class FrontendController < ApplicationController end The page controller inherits from this controller. = Serving pages Edit your config/routes.rb: localized(I18n.available_locales) do scope "/:i18n_locale", :constraints => {:i18n_locale => /#{I18n.available_locales.join('|')}/} do match '/' => "ecm/cms_core/page#respond", :page => 'home/index', :as => :root match "/*page", :to => "ecm/cms_core/page#respond", :as => :page end end match "/", :to => redirect("/#{I18n.locale}") = Creating blank home pages for your locales there is a rake task, that will create needed folders and templates for the home page for all available locales: > rake ecm:cms_core_engine:create_home_pages # Title helper There is a title helper that can be used in your layouts: <title><%= cms_title 'Your page name' %></title> # Meta description tag helper <%= cms_meta_description_tag %> = Usage You can administrate your templates (pages) and snippets (partials) in active admin. = Todo * Better tests. * Better docs. * Page previews. * Add default home templates. = License This project rocks and uses MIT-LICENSE.
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ecm_cms_core-0.0.8 | README.rdoc |
ecm_cms_core-0.0.7 | README.rdoc |
ecm_cms_core-0.0.6 | README.rdoc |
ecm_cms_core-0.0.5 | README.rdoc |