I am using the Views Tree Module which allows me to create a View that illustrates parent-child relationships.
My 'associations' go like this:
I have 3 content types which entity-reference each to a single direction.
A Sub task has an EntityReference field pointing to a Main Task and a Main Task has an EntityReference field pointing to a Project.
Subtask -> Main Task -> Project. (associations are done with EntityReference fields)
Now I'd like to embed this view as a block within a given Project's page. Naturally I use a Contextual Filter that uses the ContentID from Url setting.
I thought this would allow me to view within that Project's page the Main Tasks and Sub Tasks that belong to it, but since only the Main Tasks are directly connected with the Project itself only the Main Tasks are shown.
The question:
Is there any way to bring the Subtasks(which belong to the Main Tasks that belong to the given Project) to show as well?
Summary of my project
To sum this up:
I have 3 content types
- Project
- Main Task
- Sub Task
- A Subtask entity references a Main Task and this in turn entity references a Project
- I use the Views Tree module to list the Main Tasks and the Subtasks below each Main Task(in a 'tree-style' view
- I want to show this view with the appropriate Main Tasks/Subtasks inside each Project page.
- I use the Views Tree module to construct parent-child relationship Views