I have a view with the list of nodes, how can I put the widget to rate the nodes next to title?

Note: I'm already using the Rate module. But it returns me only the results.

  • Use rate(drupal.org/project/rate) module
    – NTT
    Aug 24 '16 at 14:18
  • I'm already using this module. But it returns me only the results.
    – Daniele
    Aug 24 '16 at 14:23

Since you're using the Rate module, you should configure Views as shown in this image:

enter image description here

So what you need to do, is to configure the field "Votes:Value". As you can see in my image above, within the Appearance Dropdown I selected Rate Widget (compact). if you only have "Rate Widget option or Default" (as in your comment, it's probably because you have not yet added the required Relationships to your view.

Relationships is a way to join tables from another module. To get you going with this also, have a look at the next image:

enter image description here

Some more details about the 3 (numbered) annotations I added in this image:

  1. That's where you add the Relationship, in this case you need to select Content:Votes.
  2. After you added that relationship, within Fields you can now add a new field Votes:Value (that is: because of the relationship that was added, you'll be able to select this specific field from the list of available fields when you try to add an extra field).
  3. After you completed the previous step, automagically in the preview area you'll see a preview of the views results you'll get (don't bother too much about the theming of that preview at this time, what counts is that the result is correct).
  • How can I have the rate in a dropdown list?
    – Daniele
    Aug 24 '16 at 14:50
  • what does dropdown list means?
    – NTT
    Aug 24 '16 at 14:59
  • Something like select list html or input list style
    – Daniele
    Aug 24 '16 at 15:35
  • 2
    Change that in Appearance Dropdown
    – NTT
    Aug 24 '16 at 15:35
  • 1
    You have to add relationship in views
    – NTT
    Aug 24 '16 at 15:43

It is usually done by a module, yet none of the major modules is ready for Drupal 8.

Try fivestar: It has a longtime supported Drupal 7 version and also a github dev for 8 (can't tell how stable).

More information for further investigation in this article.

If you are a programmer, I encourage you to consider porting Fivestar for Drupal 8.

Then, after installing to module, add rating field for each node, and make sure it is part of the view, as you would for usually any other field.

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.