Pass Nid as argument in Field collection Views
A field collection is internally represented as an entity, which is embedded in the host entity. Thus, if desired field collections may be viewed and edited separately too.
To Pass Nid as argument in Field collection Views one can follow the following steps:---
- Create a field collection view.
- Select field collection item from show selectbox
- Select create a block checkbox for create view as a block
- Click on continue & Edit button
- Field collection item: field name
- Field collection item: Entity with the Field collection field name from content type (field_machine_name)
- Make sure Require this relationshipenabled
- Contextual filters
- Add Content: Nid
Take a look on below image of Field collection view for reference.