I think that this may be a bug, or perhaps intended?

Views module doesn't list 'node reference' within Filter. Yet it lists 'node reference' in Sort and Argument.

Anyone?

Comments

jonbob’s picture

Status: Active » Closed (works as designed)

There's a bit of work yet to be done before node references can support filters. This is just a missing feature.

bermin’s picture

Gotcha. Let me know if there is something I can do to help.

onepairofpants’s picture

Hey,

I would really benefit from this feature. Is there anything I can do to help as well?

yched’s picture

This patch for content.module ("views filters for CCK fields") paves the way for the functionnality you ask for.

After that, you need to insert this code at the end of the nodereference_field_settings function in nodereference.module (before the last two closing curled brackets) :

    case 'filters':
      return array(
        'default' => array(
          'operator' => array(
            '=' => t('is equal to'),
            '!=' => t('is not equal to'),
          ),
        ),
      );

CCK commits seem frozen for the moment, so for now you have to patch :-)

onepairofpants’s picture

Thanks.

Do I need to apply all of the patches on that page? If not, which ones should I apply?

Thanks again,

Thom

yched’s picture

No, just the patch in comment #20.

onepairofpants’s picture

yched,

Thanks so much. That worked perfectly. Any idea when that patch will be committed? It seems essential to anyone building a complicated site with CCK and views....

Thanks again,
Thom