1

I have two content types in my application:- Student Teacher

Teacher-Student has parent child relationship. Inside Student there is a node reference field to Teacher which means that when creating a student user needs to provide one or more Teacher's before saving content type. So one student is related to multiple Teacher here.

Suppose X is a student. Y and Z are teachers of X. Now when I opened the student(X) page then I want to see all the related students in a block who belongs to either (Y or Z) or Both.

Can it be possible using Views UI?Please let me know your suggestion on this.

  • How do you manage the relation? Are you using Entity Relationships module ? – niksmac Nov 23 '12 at 4:52
  • Hi Nikhil, I am using Node Reference Module to reference the content types. – simple user Nov 24 '12 at 2:29
  • Did you tried views by adding a relationship ? – niksmac Nov 25 '12 at 12:57
0

Your invaluable suggestion moved me for searching deeply in the relationship of Views UI and guess what? I solved the problem after the hours of study in Views UI. Here in this case there are two relations involved. The 2nd relation is involving the first one. This will not be possible to sort out if I didn't know how to turn on the SQL query in Views UI. This link also helped me.

Use of relationships (joins) in Views

Thanks You Nikhil!

| improve this answer | |

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.