function og_view_group in Organic groups 6.2
Same name and namespace in other branches
- 5.8 og.module \og_view_group()
- 5 og.module \og_view_group()
- 5.2 og.module \og_view_group()
- 5.3 og.module \og_view_group()
- 5.7 og.module \og_view_group()
- 6 og.module \og_view_group()
Modifies the group node to serve as a group home page.
When you view a group, you see some facts about the group in a block.
If the OG Views module is enabled, you also see a list of nodes affiliated with that group. The specific view may be changed by modifying the 'og_home_page_view' variable.
If you use the OG Panels and the group has defined a default home page, then that page becomes the presentation of the GHP.
Return value
void Add changes to $node->content by reference.
1 call to og_view_group()
- og_nodeapi in ./
og.module - Implementation of hook_nodeapi().
File
- ./
og.module, line 1185 - Code for the Organic Groups module.
Code
function og_view_group(&$node, $teaser = FALSE, $page = FALSE) {
if (isset($node->og_description) && ($teaser || !$page)) {
$node->content['og_description'] = array(
'#type' => 'item',
'#title' => t('Description'),
'#value' => check_plain($node->og_description),
);
}
else {
// See http://drupal.org/files/issues/bc-fixup-204415-50.patch for an alternate way
$bc = og_get_breadcrumb($node);
array_pop($bc);
drupal_set_breadcrumb($bc);
unset($node->content['body']);
$node->content['og_mission'] = array(
'#value' => $node->body,
// node_prepare() already ran check_markup()
'#node' => $node,
'#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'body_field') : -3,
'#theme' => 'og_mission',
);
}
}