Is it possible to display rate widgets on Search API results? I am using Views PHP module and have successfully added Flags via:

print flag_create_link('flag', $data->entity);

I assume something similar would do the trick for Rate:

$vote = rate_embed($data->entity, 'rate');
print render($vote);

or

print rate_embed($node, 'rate', RATE_FULL);

Although I get "Notice: Trying to get property of non-object in rate_embed() (line 779 of .../public_html/example/sites/all/modules/rate/rate.module).

Comments

ivnish’s picture

Status: Active » Closed (outdated)

Drupal 7 is EOL. Issue will be closed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.