Last updated June 11, 2008. Created by Amitaibu on June 5, 2008.
Log in to edit this page.
1. Go to /admin/build/block/configure/og_subgroups.
2. In Page specific visibility settings select 'Show if the following PHP code returns TRUE (PHP-mode, experts only).'
3. Paste the following code, that returns TRUE if the group has a parent or children.
<?php
// Only print this block if the viewed group has a parent or children.
if ($node = og_get_group_context()) {
$gid = $node->nid;
$top = og_subgroups_get_family($gid, 'up');
$bottom = og_subgroups_get_family($gid, 'down');
if ($top || $bottom) {
return TRUE;
}
}
?>