Drupal 7 for each user Example what i need:

I have views page with list of users (facet api (not solr)

Filter 1 = vendor (facet by taxonomy term)

Filter 2 = location (facet by taxonomy term)


List of user

User 1 profile : field vendor (term) | field location (term) | ! block of rating user 1 (count nodes (refense nodes by type) to current user (for example “complited project” which user made by vendor and location by current selected facet filters )

User2 profile : field vendor (term) | field location (term) | ! block of rating user 2 by current active filter

User3 profile : field vendor (term) | field location (term) | ! block of rating user 3 by current active filter

If I use page only with user list (without block of rating) – it’s no problem but if I want use on the same page blocks with rating for each user - it’s big problem

For block of rating I tried to use field Global View field in which insert block with count of entity reference nodes (also tried use just value of reference field (nodes) – it’s always show all value – not by active filter)

Solutions which I tried (not work as I want) for block of rating:

  1. search api filter work only by unique field, situation looks like

Example filter for vendors:

First indexed field for user: (field in search api index)

user -> user profile -> vendors

Second indexed field for nodes of current user (for count rating)

user-> user profile -> entity reference (node) -> vendor

in page list of user – if use only First filter (by user -> user profile -> vendors) - > second indexed field (nodes) not work

it’s need two filter in same page (for first and second field – so I have duplicate of filter – but I need just one filter – by user profile -> vendor)

(may be exist way to insert value from one filter to another and hide second filter but I don’t know how to do this)

  1. I tried to use the same name of field (it’s not good for my project)

First indexed field (index of users)

User profile -> vendors

Second indexed field (index of nodes)

Node-> vendor

Now I can use one filter for user and block of rating in same time but - if user has not vendor and in node of user have vendor - > page empty (because filter show term of user and node in same time – I need to show only terms of user - not terms of nodes in filter to search by user)

  1. I tried module Group for facet – but it’s not working

  2. I tried to take tid from url in contextual filter of block (usual block and facet block) (to get term of current selected facet filters value) – not work

Please help how to find solution?

Your Answer

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

Browse other questions tagged or ask your own question.