0

I am trying to insert a view inside a view but struggling a bit

I have a view called My Class with all my fields in it, this works fine.

I have a view with a contextual filter called Students Block, (This is using the reference to the my class content type that populates the My Class view) machine name students_block and a BlockView called students_block

I've set up a contextual filter and reference to My Class and again this works as expected when used as a block.

Now I am trying to add the students_block in the middle of the My Class view.

I have set up content hidden ID to expose the NID, and then a global custom text field that has as follows

{{ drupal_view('Students Block', 'students_block', nid) }}

I can't whatever I do get any results, if I remove the nid I do get my original view, and I have tried other blocks as per the examples and that seems to work for me

Can anyone assist please

Thanks

Your Answer

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