Hi,

I'm using Drupal to display a museums collection of objects and have set it up so that users can flag their favorite objects.
I'm then using Panels to override the display of the objects, so that the fields are all laid out nicely, and am wanting to add a section using views that displays something like... Users who have favorited this object have also favorited... similar to how Amazon, and other e-commerce sites, display other products that users have purchased.

Any idea if this is possible using views and panels? and if so how?

Thanks in advance.

Comments

mooffie’s picture

(I'm not mentioning Panels in my reply: Panels can embed a view in your panels, so the only issue to discuss is Views.)

Users who have favorited this object have also favorited...

It will be possible to construct this view once the #371432: Exposing the flaggings table: Alternative Views support patch gets committed.

Right now, using our Views support, you can start from an item and get all the users who flagged it. The aforementioned patch will make it possible to start from a user (or users; who are the result of the previous step) and get all their flagged items. That's want you want.

The only "food for thought" is how to get rid of duplicate records (i.e., items flagged by several users). Views can add a DISTINCT to the query, but perhaps it won't be effective, in which case other devices could be used (e.g. Views' "group by field" feature, or a theming preprocess function).

mooffie’s picture

Category: support » feature
Status: Active » Closed (duplicate)

I'm marking this a dup of #371432.