开发者

Rails CMS with custom types

I come from the .NET world and have some PHP background as well. I'm currently developing in Ruby on Rails and I'm using Rails 3.1 and Ruby 1.9.2.

I've been researching about Rails CMSs, but haven't had much luck with what I've been looking for.

The one feature that I'm looking for is the ability to create custom types with custom fields, as I can do with both Sitecore and N2CMS on .NET, 开发者_如何学JAVAand both Drupal and Joomla on PHP.

Are there any good alternatives on Ruby on Rails that possess this ability? If not, is it easily achievable in any Rails CMS?


Check out Locomotive.

It has Custom content types.


I went through this same struggle, and just ended up building something on my own from scratch on top of Rails—it was a lot easier than I thought it'd be.

For example, all of my normal pages get routed like this:

get '/:slug' => 'page#show', as 'page_path'

But I also have custom data types such as 'events'. These are their own model, and as I only interact with them via ajax at this point:

get '/events/:year/:month' => 'events#get_by_year_and_month, :as => 'get_events_by_year_and_month'

All of the content editing is protected by Devise, behind the :admin namespace:

namespace :admin do
  resources :pages
  resources :events
end

And so on. If you're not comfortable enough with HTML and CSS to build a nice UI for the admin stuff, it may not be a great idea, but there are plenty of templates and examples out there.


I recently built a site using a CMS called Refinery. http://www.refinerycms.com.

In Refinery, you can build your own engines to handle custom types / fields as needed. Here is their quick start guide on how to achieve this:

http://refinerycms.com/guides/getting-started-with-refinery#extending-refinery-with-your-first-engine

The only downside to Refinery (imo) is that if you expose part of the code so you can customize it (you do this by copying parts (views, controllers, etc.) out of the Gem and into your normal Rails app directory structure), it then gives you a stumbling block when updating the Refinery Gem a newer version.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜