Git Product home page Git Product logo

refinerycms-testimonials's Introduction

Testimonials plugin for Refinery CMS

Version 2.0 is a rewrite of the original refinerycms-testimonials. It is compatible with Refinery CMS 2.0.

How to install

In your Gemfile, add the gem:

gem 'refinerycms-testimonials', '~> 2.0'

Now, run bundle install and the gem should install.

To install the migrations, run:

rails generate refinery:testimonials
rake db:migrate
rake db:seed

Add Testimonials to the database

You can now add testimonials to the database through the Refinery CMS. The testimonials fields are

  • quote (the actual testimonial)
  • name (of testimonial sender)
  • company ( ditto )
  • website ( ditto )
  • jobtitle ( ditto )
  • received_channel (letter, email, facebook, twitter)

##Control Testimonial display on a page

Each page now has a testimonials tab which can be used to decide how testimonials should be displayed on that page

  • Show Testimonials on this page (default: no)
  • How many testimonials to show (n, 0 means show all)
  • How to select and order which testimonials to show (Random, Most Recent First)

Changes to Views or Layout Templates

See Enabling Custome Layout Templates in this refinery guide

Views

Somewhere in a view or layout you will need to call the testimonials partial.

<section id='side'>
  <%= raw @page.content_for(:side) %>
  <%= render 'refinery/testimonials/testimonials' %>
</section>

will render the CMS content for a page part called 'side', followed by some testimonials.

For more control over what is displayed the @testimonials collection is available for you. You can call your own partial to render the collection.

<%= render 'myTestimonials', :testimonials => @testimonials.as_json %>

refinerycms-testimonials's People

Contributors

anitagraham avatar parndt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.