https://github.com/hounddd/wn-reviews-plugin
Show reviews, ratings or testimonials of your customers.
https://github.com/hounddd/wn-reviews-plugin
plugin reviews wintercms
Last synced: 18 days ago
JSON representation
Show reviews, ratings or testimonials of your customers.
- Host: GitHub
- URL: https://github.com/hounddd/wn-reviews-plugin
- Owner: Hounddd
- License: mit
- Created: 2023-07-06T18:23:45.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-03T16:55:56.000Z (about 1 year ago)
- Last Synced: 2025-03-29T10:43:45.457Z (about 1 month ago)
- Topics: plugin, reviews, wintercms
- Language: PHP
- Homepage:
- Size: 192 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Review plugin for WinterCMS

Show reviews, ratings or testimonials of your customers. No other plugin dependency.
## Features
* Manage reviews from backend
* Frontend components to display reviews## Installation
*Let assume you're in the root of your wintercms installation*### Using composer
Just run this command
```bash
composer require hounddd/wn-reviews-plugin
```### Clone
Clone this repo into your winter plugins folder.```bash
cd plugins
mkdir hounddd && cd hounddd
git clone https://github.com/Hounddd/wn-reviews-plugin reviews
```> **Note**:
> In both cases, run `php artisan winter:up` command to run plugin's migrations## Components
This plugin offer 2 components also availables as page snippets for Winter.Page plugin.
* **`reviews`** display a paginated list of reviews
* **`reviewsSlider`** display reviews in a slider### Show reviews with `reviews` component
```twig
title = "Our customers reviews"
url = "/reviews/:page?"
layout = "default"
is_hidden = 0[reviews]
pageNumber = "{{ :page }}"
categoryFilter = "{{ :category }}"
reviewsPerPage = 10
noReviewsMessage = "No reviews found"
sortOrder = "rating desc"
==What our customers say about us?
{% component 'reviews' %}
```
#### **`reviews` component properties**| Property | Type | Description |
| --- | --- | --- |
| `pageNumber` | String | Page parameter for pagination.
Default: `'{{ :page }}'` |
| `reviewsPerPage` | String | Numbre of reviews per page.
Default: `'10'` |
| `categoryFilter` | String | Either a category slug or the page parameter to use for filtering categories.
Default: `''` |
| `noReviewsMessage` | String | Default: the `lang.components.general.no_reviews_default` key for translation file in use |
| `sortOrder` | String | The sorting order to use.
Possibles values:
- title asc
- title desc
- created_at asc
- created_at desc
- updated_at asc
- updated_at desc
- rating asc
- rating desc
- random
Default: `'created_at desc'` |
| `ratingDisplay` | String | Rating display type
Possibles values:
- none: rating is not displayed
- stars: use stars
- text: use text
- both: use both stars and text
Default:`'both'` |
### Show reviews with `reviewsSlider` component
By default, the component lets you choose between different types of slider:
- Using **[Tiny Slider 2](https://github.com/ganlanyuan/tiny-slider)**
- Using **Tailwind CSS & Alpine JS**.
```twig
[reviewsSlider]
sliderType = "tailwind_alpine"
noReviewsMessage = "No reviews found"
sortOrder = "rating desc"
==
What our customers say about us?
{% component 'reviewsSlider' %}
```
#### **`reviewsSlider` component properties**
| Property | Type | Description |
| --- | --- | --- |
| `sliderType` | String | The slider type to render.
Possibles values
Possibles values:
- tailwind_alpine
- tiny_slider
Default: `'tiny_slider'` |
| `categoryFilter` | String | Either a category slug or the page parameter to use for filtering categories.
Default: `''` |
| `noReviewsMessage` | String | Default: the `lang.components.general.no_reviews_default` key for translation file in use |
| `sortOrder` | String | The sorting order to use.
Possibles values:
- title asc
- title desc
- created_at asc
- created_at desc
- updated_at asc
- updated_at desc
- rating asc
- rating desc
- random
Default: `'created_at desc'` |
| `ratingDisplay` | String | Rating display type
Possibles values:
- none: rating is not displayed
- stars: use stars
- text: use text
- both: use both stars and text
Default:`'both'` |
| `showDots` | Boolean | Show dots navigation in review slider
Default: `0` |
| `showControls` | Boolean | Show control buttons in review slider
Default: `0` |
| `showCounter` | Boolean | Show a reviews counter
Default: `0` |
| `autoPlay` | String |The delay in seconds before the slider must show the next review.
Default: `'0'` (disabled) |
| `loadScripts` | Boolean | The required scripts must be loaded by the component.
Default: `1` |
Sliders make use of javascript to control the slides, the needed scripts will be loaded automatically if you set the `loadScripts` component property to `true`.
> **Note**:
> ⚠ As Tailwind is an utility CSS framework, it will not be loaded by the component.
> If you're using Tailwind CSS and Alpine JS slider, you may need to add the component's path to the `content` property of your theme's `tailwind.config.js` file.
> ```js
> module.exports = {
> content: [
> // ...
> './../../plugins/hounddd/reviews/components/**/*.htm',
> ],
> // ...
> }
> ```
## 🏆 Credits
Inspired by [Mja.Testimonials](https://github.com/MatissJanis/oc-testimonials) [VojtaSvoboda.Reviews plugin](https://github.com/vojtasvoboda/oc-reviews-plugin)
***
Make awesome sites with ❄ [WinterCMS](https://wintercms.com)!