You are here

function og_view_group in Organic groups 6

Same name and namespace in other branches
  1. 5.8 og.module \og_view_group()
  2. 5 og.module \og_view_group()
  3. 5.2 og.module \og_view_group()
  4. 5.3 og.module \og_view_group()
  5. 5.7 og.module \og_view_group()
  6. 6.2 og.module \og_view_group()
1 call to og_view_group()
og_nodeapi in ./og.module
Implementation of hook_nodeapi().

File

./og.module, line 1269

Code

function og_view_group(&$node, $teaser = FALSE, $page = FALSE) {
  if ($teaser || !$page) {
    if (!empty($node->og_description)) {
      $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' => -3,
      '#theme' => 'og_mission',
    );
  }
}