Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
In my theme I had the following:
foreach ($node->og_groups_both as $gid => $gtitle) {
$group_links[] = l($gtitle, 'node/' . $gid);
}
but it doesnt work in preview mode for a content type. Is this a bug, or should I be getting the group names in a different way ?
Comments
Comment #1
pheraph CreditAttribution: pheraph commentedSame problem here.
Comment #2
exobuzz CreditAttribution: exobuzz commented$node->og_groups is available on preview, so with an additional lookup we can get the group name.
this works for me
Comment #3
gawas.sachin CreditAttribution: gawas.sachin commentedthis worked for me