Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

Star Ratings Plugin - Summary Page

Started by NOT Andy Miller 9 years ago · 2 replies · 623 views
9 years ago

Hi.

I'm using the Star Ratings Plugin with the Learn2 theme - essentially every page can have a star ranking (it's a television show fansite and each page relates to an episode).

The star ratings work great on a per-page basis but I'd really like to create a 'master summary' page that lists all pages and their associated star rating - maybe even sortable by rating.

I've read the docs on the github repo for the plugin, but I can't really figure out how to get started creating this page. Is anyone else doing something similar or can perhaps point me in the right direction?

Thanks!

9 years ago

Never used the stars rating plugin but it looks like it only requires an id, so you just have to loop through all the pages and display their ratings.

Exemple:
{% for item in pages %}
{{ item.title }} - {{ stars(item.route) }}
{% endfor %}

9 years ago

Thanks for your response. I haven't had time to check it yet but I will let you know my results!

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Rene, 1 week ago
2 46 1 week ago
Plugins · by Xavier, 4 weeks ago
2 55 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1181 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 49 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 73 2 months ago