Unstatic Plugin ================ Rails plugin that allows you to easily define editable content areas on your site, without dealing with a full-blown CMS. It's designed to plug in to any rails app with minimal effort, and without forcing you to modify any of your existing code or templates, other than adding calls to the helper method where you'd like to edit content dynamically. For more info, see: http://mega.blaix.com/tags/unstatic Requirements ============= * Edge Rails (though it may work with 2.0 pre-release) * BlueCloth Installation ============= script/plugin install http://svn.megablaix.com/plugins/unstatic script/generate unstatic_migration rake db:migrate Now add the following to config/routes.rb: map.resources :unstatic_nodes map.resources :unstatic_sessions map.unstatic_login '/unstatic/login', :controller => "unstatic_sessions", :action => "new" map.unstatic_logout '/unstatic/logout', :controller => "unstatic_sessions", :action => "destroy" You can run the specs to make sure everything's working (assuming you have rspec set up): rake spec:plugins:unstatic Usage ====== Put the following anywhere in your views that you'd like to have editable content: <%= unstatic_content("Name") %> "Name" should be a descriptive string to identify the content node. E.g. "Sidebar", "Footer", etc. Each string will represent a different unstatic content node. You can use the same string in multiple calls to the helper if you'd like to display and edit the same content in multiple locations. In order to edit the content, you'll need to log in. Unstatic currently doesn't have an interface for managing passwords, so you'll have to add one through script/console: script/console > UnstaticPassword.create(:password => "my_password") Now log in at: http://mysite.com/unstatic/login After logging in, when you visit a page that calls unstatic_content(), you'll see a link to edit. To log out, visit: http://mysite.com/unstatic/logout Copyright (c) 2007 Justin Blake, released under the MIT license