3

I have a product display using facets that I have tried in vain in views to add a flag/unflag link to with views I already built a separate comparison view with the relationship to flag and the ability to unflag but I want to be able to flag products from the facets display (if it's even possible) rather than a second display that looks the same as the facets display except that it uses content linked to the product entity and wont show the facets

Does anyone know if it's even possible to add a flag to a view of type "Product Display"?(Correction: "Product Display" was the name of my search api index being exposed to views)

For now I have this working by exposing the flag link on the product displays themselves which is a pain in the neck to flip back and forth and some users probably aren't going to be able to be techie enough to figure it out

-1

I am having the same problem. It seems like there is no way to add 'flag' relationship in view used by facets.. The way I have done this is:

  1. I installed the module 'Views PHP' (https://drupal.org/project/views_php)
  2. Added a 'global PHP' field in my faceted view.
  3. called the function to create flag link and printed the link in the global php field: print flag_create_link('bookmarks', $data->entity)

Dont know why, my php view cudn't render $row->nid, thus I used $data->entity for node id.

Remember to enable php filter once views php is installed.

Hope It helps.

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.