1

I have two content types, 'user' content type where I have some info about user and then 'post' content type.

Now I have a view that gets all 'posts' and shows them correctly but I would need to get image (field_user_image) from 'user' content type. How can I get in views from this another content type this image field?

EDIT: Can I do this somehow on code level in template.php?

0

1 Answer 1

1

I cannot give you a very detailed answer, mainly because it has been too long since I built new things with Drupal 6, but also because I don't know which Views version you are using.

But anyway, the key to your answer is "relationships". Views allows you to define a relationship from one item to another (for instance: node -> author (user)) and then query properties of the related item (node -> author[name]). You can even chain relationships, so you can query a property of a related item of a related item. This seems to be what you need: node -> author -> node[field].

For more info I recommend that you find some video's or tutorials about views relationships, like these ones:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.