aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Thompson <james.b.thompson@gmail.com>2012-03-14 11:50:33 +0200
committerJames Thompson <james.b.thompson@gmail.com>2012-03-14 11:50:33 +0200
commit01f9f42ad4125008708fb0bdc6a9e1f47ae5bc68 (patch)
treeebfbad2b35e7d7ff0d168282b2b5f0d668356adc
parent56d7747f54e86993415b76c92e101608e5ea44e2 (diff)
downloadrefinerycms-pc_banners-01f9f42ad4125008708fb0bdc6a9e1f47ae5bc68.tar.gz
refinerycms-pc_banners-01f9f42ad4125008708fb0bdc6a9e1f47ae5bc68.tar.bz2
refinerycms-pc_banners-01f9f42ad4125008708fb0bdc6a9e1f47ae5bc68.zip
updated readme
-rw-r--r--readme.md55
1 files changed, 48 insertions, 7 deletions
diff --git a/readme.md b/readme.md
index e721ef9..64b7ed0 100644
--- a/readme.md
+++ b/readme.md
@@ -1,10 +1,51 @@
-# Banners extension for Refinery CMS.
+# Refinery CMS Banners
-## How to build this extension as a gem
+Simple banners engine for [Refinery CMS](http://refinerycms.com). Creates a many-to-many relationship between Pages and Banners, allowing an Image to be assigned to a Banner as well.
- cd vendor/extensions/banners
- gem build refinerycms-pc_banners.gemspec
- gem install refinerycms-pc_banners.gem
+This version of `refinerycms-pc_banners` supports Rails 3.
- # Sign up for a http://rubygems.org/ account and publish the gem
- gem push refinerycms-pc_banners.gem \ No newline at end of file
+## Requirements
+
+Refinery CMS version 2.0.0 and above.
+
+## Install
+
+Open up your ``Gemfile`` and add the following:
+
+ gem 'refinerycms-pc_banners', '2.0', :git => 'git://github.com/julesce/refinerycms-pc_banners.git'
+
+Now, run:
+
+ bundle install
+
+Next, run:
+
+ rails generate refinery:banners
+
+Migrate your database:
+
+ rake db:migrate
+
+And let's hook up the seed data:
+
+ rake db:seed
+
+## Usage
+
+It is up to you to make use of the banners assigned to your pages. To get the published banners for your current page:
+
+ @page.banners.published
+
+Let's say you are using the [Nivo Slider](http://nivo.dev7studios.com/) for your banners in your views, you could do the following:
+
+ <div id="nivo_slider">
+ <% if @page.present? and @page.banners.published.present? %>
+ <% @page.banners.published.each do |banner| %>
+ <%= image_fu(banner.image, '960x310#c') %>
+ <% end %>
+ <% end %>
+ </div>
+
+ Or you can use the following to accomplish something very similar to the above:
+
+ <%= render :partial => 'refinery/banners/shared/banners' %> \ No newline at end of file