0

I'm building a review channel and would like to know how to go about developing this. Say for instance I'm reviewing an album and have the ratings breakdown into different categories with ratings like so:

  • Album art ------- 9
  • Lyrics ------------7
  • Instrumentals --- 9
  • Vocal range ---- 5

Album score ------- 7.5

The ratings will be for the author to decide, not the public. This is what I'm envisioning in the EE backend:

[+] Matrix/Grid row: "[category dropdown column] and [score dropdown column]"

I'm wondering how I would go about totaling up and averaging out the score to be displayed to the public?

2

Matrix actually comes with this functionality, if you look at their docs, there is a average function.

{exp:channel:entries channel="YOUR_CHANNEL"}
    {YOUR_MATRIX_FIELD:average col="SCORE_COL"}
{/exp:channel:entries}

Grid also has this function listed in their docs

{exp:channel:entries channel="YOUR_CHANNEL"}
    {YOUR_GRID_FIELD:average column="SCORE_COL"}
{/exp:channel:entries}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.