Download the PHP package i-lateral/silverstripe-reviews without Composer
On this page you can find all versions of the php package i-lateral/silverstripe-reviews. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download i-lateral/silverstripe-reviews
More information about i-lateral/silverstripe-reviews
Files in i-lateral/silverstripe-reviews
Package silverstripe-reviews
Short Description Expands comments module to also allow for reviewing of an object
License BSD-3-Clause
Homepage http://github.com/i-lateral/silverstripe-reviews
Informations about the package silverstripe-reviews
silverstripe-reviews
Add ability to review dataobjects by expanding on the core "comments" module
This module allows you to attach a "comments form" (and thread) to an object,
in much the same way as the silverstripe-comments
module, but the form
adds a Rating
field and you can customise the min and max values via
SilverStripe config.
Installation
Install via composer:
composer require i-lateral/silverstripe-reviews
Usage
Adding reviews to an object is done in much the same way as the comments module.
First you must add the extension, then you can customise any of the CommentsOptions
.
For example, if I have a Product
class (in the global namespace) then I would add the
following to config.yml
(note: you must also add the comments extension).
Once you have done this, you can customise options (such as min/max rating) as below:
NOTE This module extends on the functionality of the comments module, so you still need to add the template variable to your Page/Controller template:
$CommentsForm