Score:-2

Views Reference Field shows nodes of all groups

id flag

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?

Score:0
be flag
jme

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)

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.