Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If you want to reference content types in your global settings of your administration settings, the view doesn't get filtered, i. e. all items are displayed. The reason therefore is that a default view is exposed via the hook nodereference_explorer_views_default_views(). The filters for this view are specified in the widget settings ( "Content types that can be referenced"). The question is how to feed the hook with the widget settings?
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedyou wouldn't do this in the hook. the right place to do this is after the view has been loaded but before the display has been executed, you can add filters to the view. no specific directions for you yet, though... but that's the way it will need to work.
Comment #2
gnindl CreditAttribution: gnindl commentedThe default view is filtered in the constructor of the nodereference_explorer.views.class.inc. Inital display is filtered whereas applying exposed filters results in an error (illegal choice).
Comment #3
gnindl CreditAttribution: gnindl commentedUsers are encourage to take the advantages of Views. The default view is just a starting point
Comment #4
gnindl CreditAttribution: gnindl commentedThis issue has partly been solved, nethertheless a new issue arises...
http://drupal.org/node/533560
Comment #6
fonant CreditAttribution: fonant commentedJust to be clear, to make your own view for the nodereference_explorer popup:
Easy, and powerful, when you know how!