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.
Is there a way on a per node basis to select (deactivate/activate) the add Referenceable node Link?
Comment | File | Size | Author |
---|---|---|---|
#2 | nodereference_url_views_list-d7.patch | 3.96 KB | quicksketch |
Comments
Comment #1
quicksketchThe ability to restrict a Node Reference field to use a view (provided by Views module) in Drupal 7 was just recently added to the References project again. Using a view, you can choose which items are referenceable by filtering on some field or value. You could for example make a checkbox on your content and give it the title "Referenceable", then you could filter your view on that checkbox value.
Unfortunately Node Reference URL Widget doesn't yet respect the View filtering when displaying a link (since it was just added recently). So this has become the official request. ;)
Comment #2
quicksketchI've fixed this functionality with the attached patch. It looks like we were almost there; we just needed a few minor changes to the data structures.
I also made a few other changes to the code to clarify the difference between an $instance and a $field, since in D7 they're two different things instead of just being $field everywhere.
This patch has been committed to the 7.x branch and will be included in the 1.12 version.