I have a view showing the nodes of a content type which has reference entity fields to another content type.
I am trying to iterate through this view with templates.
If I choose to show nodes for my format, I can easily access the referenced entities and its fields, but I cannot track in which row.content I am.
If I switch to show fields, I can use the global view results count and I have an effective counter. However, I cannot access the referenced entities to get the values of the fields.
So far I have not found anything that actually addresses this particular problem. I am using the views-view-unformatted template which in turn calls the node--view template. I am unable to "pass" along the row index from the unformatted views template to node view template.
I already know that this is doable when using fields, but fields is out of the question because of the inability to access referenced entities.
These are possible solutions to this issue:
- Show content and somehow track the row.content index between twig templates
- Show fields to be able to actually access the fields of referenced entities
Does anyone have any suggestion?