Is there a way on a per node basis to select (deactivate/activate) the add Referenceable node Link?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Title: Is there a way to select wich node have the aktual link to add a ref. node? » Support for displaying Add reference link based on a view in Drupal 7
Category: support » feature

The 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. ;)

quicksketch’s picture

Version: 7.x-1.9 » 7.x-1.11
Status: Active » Fixed
FileSize
3.96 KB

I'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.

Status: Fixed » Closed (fixed)

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