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.