0

I have two content types, Project and Resource,

I have a view displaying fields from Project, and also fields from Resources via an entity reference field.

The problem is, if I add more than one linked resource to a project via my entity reference field, the view duplicates that Project node, instead of adding another linked resource to that project.

Any help much appreciated!

0

I assume that you have a view, that shows content of type Project. In project you have a nested reference to a Resource. Basically you are asking views to show you all the Projects, and related to them Resources, so for every Resource that you are adding, views is showing you projects that are related to new Resource, but, since you have only one node of type Project - views showing you Project for every Resource that you added, so you have what was implied to happen.

If you want to have list of Resources on a Project page - I would suggest you to create small view blocks, using node id of a resource as a context filter to the view, (So in this case view would be showing you list of the Resources to the given Project on each project page.) For that you need to create another entity_reference field on a content type of Project and filter it through the view that you created.

If this is what you were looking for. It was hard to understand you tbh

  • That is exactly it thank you very much. Sorry if question is hard to understand! – JImiswells Mar 19 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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