I have taxonomy vocabulary with departments. Different users have task's nodes.

I need View like this:

Department1 Task5_ForUser10
Department4 Task7_ForUser10

I've created View with taxonomy terms, Relationship with task's node and with Contextual filter "User ID from logged in user", but I see now only short variant:

Department1 Task5_ForUser10
Department4 Task7_ForUser10

How can I get View with full department list and tasks for each user?

  • It's a bit hard to say without knowing how departments & tasks relate to each other, what type of entities they are, and more details about the view settings, but it seems like your view is showing tasks or it is requiring the relationship between departments and tasks. It would need to be a view of departments, then having the relationship to the task that is not a required relationship. But then if you are showing only things where the task matches the current user then it won't show anything other than that. It seems complex and we would need all the information to answer properly. – rooby Mar 6 '14 at 8:03
  • Departments are taxonomy terms. Tasks are nodes with term reference field. Task nodes have Author as wanted user. – Dimetry Mar 6 '14 at 8:09
  • View relationship is set as bridge to the Content entity that is referencing Taxonomy term via field. – Dimetry Mar 6 '14 at 8:34
  • As a result - I've made all code in views tpl.php files. – Dimetry Mar 11 '14 at 18:19

You can solve above problem using Views Field View module..

Project page says

This module allows you to embed a view as a field in a view. A new field handler is made available, so this can also be used in area (header/footer/empty) handlers as well as rows.

  • Create a new view which accepts term id as argument and lists nodes related to that term
  • Add Contextual Filter Author ID - Provide default value
  • In your view add term id and select Exclude option
  • In your view add above view as a field and read term id using token in settings.

enter image description here

See the result below

enter image description here

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.