Sha256: 68c711db434d6443d9b78d704232b8bb3fe0a3ecc3e20b0df03e46843d9a4aa5
Contents?: true
Size: 961 Bytes
Versions: 1
Compression:
Stored size: 961 Bytes
Contents
require 'rake' namespace :ecm do namespace :cms_core_engine do desc 'Create home pages for all locales' task :create_home_pages => :environment do p "Creating pages for locales: #{I18n.available_locales.join(', ')}" I18n.available_locales.each do |locale| p "Adding home page for locale #{locale}" lf = Ecm::CmsCore::Folder.create!(:basename => locale) f = Ecm::CmsCore::Folder.create!(:basename => "home", :parent => lf) t = f.templates.create!(:basename => 'index', :body => "h1. Home [#{locale}]", :format => 'html', :handler => 'texterb', :locale => locale, :partial => false, :title => "Home [#{locale}]" ) p " -> Created #{t}" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ecm_cms_core-0.0.5 | lib/tasks/ecm_cms_core_tasks.rake |