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 use the Group module and I have created several groups and assigned several nodes as content of these groups.
For example, I know id of some node. How can I figure out which groups contain this node ? That is, how to get group ids by nid, if this node is a content of these groups ? And I don't want to use SQL for it. Are there methods of classes for it ?
Comments
Comment #2
drupalfan2 CreditAttribution: drupalfan2 as a volunteer commentedTry this in your theme file mytheme.theme to get the group id and group name related to some node:
Comment #3
maaty388 CreditAttribution: maaty388 commentedComment #4
vijayan08 CreditAttribution: vijayan08 commentedHi drupalfan2,
#2 its working fine , as I expected