How to pass the node id from a View Block to an associated Views Attachment for use in filters so that both operate on same content node id? What would I need to do to pass the node id from a View Block to an associated Views Attachment for use in the filters in the Attachment View so that both operate on same content node id?

My specific example is for generating preview/teaser output from a media gallery with a certain tag:


The title of the latest gallery with that tag
The latest 3 thumbnails of that gallery


(I know how to build a block view to fetch thumbnails from galleries (i.e plural) that have a certain tag - my solution is here: https://drupal.stackexchange.com/a/13559/1082 I am using the Acquia Media module)

BUT what I don't know how to do is to get the title latest gallery (singular) with a certain tag followed by the latest 3 thumbnails of that gallery.

I attempted to create a block view that fetched the title of the gallery with the certain tag and I also created an view attachment to fetch the thumbnails of that gallery. But I could not work out how to pass the node id of the gallery from the block view to the attachment for it to use in its filters when fetching the thumbnails.

I tried various options including enabling the attachment to inherit arguments and filters from the block view and also contextual filters but no success so far.

Further to this, I may wish to out put more than one gallery in the teaser/preview but if I set the count to more than one on the view block I get the other gallery titles listed together followed by the thumbnails. I would want each gallery in turn to display the title followed by thumbnails that belong to it.

I would prefer to do this all withing Views i.e. not have to use PHP. I would want the solution to be as forward compatible as possible, i.e. not break with future updates - if we can stay within Views then the migration to those might be easier.
Since the attachment is linked to a specific view block, it should gain access to the information in the block.  You can inform the block of the node ID by using contextual filters.
1. In the block  add a contextual filter of the type content:nid.
2. Since blocks do not have paths you must explicitly tell the block to find the display node, so under form heading of "When the filter value is not available", choose "Provide default value" and select "Content ID from the URL".  This should provide the Node ID to the view block.