-2

On my website users can create groups. All groups have two content types:

  • Book
  • Chapter (is always a child of content type Book)

Only administrators are allowed to create new nodes. An administrator could be a member of two groups.

In the content type Book a Views Reference Field is created, which all nodes from the content type Chapter shows.

The problem I'm facing: If an administrator creates a new Book node, he could use the Views Reference Field to connect chapter to the book. But the Views Reference Field shows lessons of both groups.. it should only show the lessons which are created in the group he is working in.

Any ideas how I can restrict the Views Reference Field to the current group of the administrator?

1 Answer 1

0

On the field settings administration page, you can set the Reference method to a view that you create (create a new view or add a Entity Reference display to an existing view), so you could filter the available results of the autocomplete field according to your criteria (I believe that contextual filters should be available in that view as well)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.