Appreciate any help with the following Views filter/relationship/argument issue:

Summary:

I need to display a view that is filtered (dynamically as I won't know the actual value) by the value of a content field in the user profile (a CCK field using Content Profile Module). How do I configure the filter/relationship/argument correctly to achieve the following result?

The View will only display Node1 (in a block) if content_field_x (in Node1) matches content_field_y (in Node2).

I cannot use user id in filter because Node1 is not created by the same user.

I am having a hard time trying to compare two content fields within Views. I try not to hack the module and assume that there has to be a way to do it using the right configurations among filter, relationship, and argument in Views.

I tried to look for another Views or CCK related module that allows comparison of 2 content fields in different nodes but with no luck so far.

Any suggestion is appreciated.

Comments

nevets’s picture

If the user is viewing node 2 when you want to display node 1 in a block you can add an argument on field_y (node 2), specify a default argument using PHP code.

tobewiser’s picture

I'm aware of this option using default PHP code. Is there a way to avoid using custom code to make it work?

nevets’s picture

Not that I know of.