Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I would like to add an existing media_gallery to another node.
In this node there should be a thumbnail displayed, clicking on this will open the gallery in lightbox2
I there a way to do this?
Comments
Comment #1
HughC CreditAttribution: HughC commentedI'd second this; I've been playing around with the Relation module and I've set up a Media Gallery entity that is 'related' to the current node, but the only way to display the gallery is via a link, rather than as a thumbnail or some such. This seems to be more of a limitation of the Relation module than anything else (no means to display the related entity inline).
A cleaner way of doing it would be great. The only other option I can see would be to duplicate and extend the Gallery content type to include the other fields required, but that seems backwards.
I can see that Media is the way forward in media-handling; in particular the metadata features make it stand out vs other simple gallery solutions like 'Gallery Formatter' for image fields.
Comment #2
lsolesen CreditAttribution: lsolesen commentedHave you tried using e.g. entityreference? Did you come up with another solution?
Comment #3
lokz CreditAttribution: lokz commentedI managed to attach gallery node to the other one by using view display attachment.
So basically I did view of one node using NID and attached gallery under it.
I was trying to find way to include gallery in a way that wordpress does [gallery], but this is the closest I got to that.
Maybe you can create block with gallery, and do it like that, but views display attachment has great possibility of combining several nodes in one page (sort of speaking).
You must know that I am still beginning and was trying to find way to show several nodes on one page. For example apartment:
One node is description, one node is price list, one node is availability and one node is gallery. Or something like that.
Comment #4
ivnish CreditAttribution: ivnish commented