Let's say I have homes and neighborhoods (homes reference the neighborhood they're in via a node reference field). On the home detail page I want to show other homes in the same neighborhood.

Seems simple enough, and I've found this: http://drupal.org/node/289738 but it is not quite what I need to do, since I need to find other homes that reference the same neighborhood as the current home does (not ones that reference the current home).

I also found this: http://drupal.org/node/1257946 but I am only using 2 content types (homes and neighborhoods). Any ideas?

Comments

AndrzejG’s picture

You can try to set 2 Relationships in the Views. First for parent, second for the title of siblings (using the first Relationships), as Views 3 support a chain of relationships. I use this technique extensively.
HTH.

haydeniv’s picture

Status: Active » Fixed

No follow ups so marking this fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

asb’s picture

Status: Closed (fixed) » Active

Sorry for reopening this issue; I have a similar problem, but I can't figure out what "First for parent, second for the title of siblings" (#1) is supposed to mean.

Example for what I'm trying to accomplish: A magazine has one or more issues; the "Issue" content type references to a node of the "Magazine" content type. On the node for "Issue #3" I'd like to display a block: "Other issues from the same magazine".

If I'd use taxonomy, I could do this with something like the 'Similar by Terms' module; If I'd use Views 2, I could use a relationship on a Nodereferrer field ("Node: Nodereferrer: by field", or "Node: Nodereferrer: by node type"). Since I'm not using taxonomy and Views 3 breaks 'Nodereferrer' Views' integration, I need another approach. However, all I get is either exactly one result ("Issue #3"), or none at all (e.g. argument on node reference field, argument plus relationship on node reference field, etc).

Would anyone share an approach how to resolve this? Thank you!

haydeniv’s picture

Status: Active » Closed (fixed)

Putting this back to closed fixed because the solution to #4 is to upgrade to Views 3. I would also recommend upgrading your site to Drupal 7 as these types of relationships are much easier to do with the new entity system and Entity Reference module which has built in Views support.