function og_panels_page in Organic groups 5
Same name and namespace in other branches
- 5.8 og_panels.module \og_panels_page()
- 5.3 og_panels.module \og_panels_page()
- 5.7 og_panels.module \og_panels_page()
- 6 modules/og_panels/og_panels.module \og_panels_page()
A menu callback. Renders an og_panel based upon its display ID.
Return value
void
1 string reference to 'og_panels_page'
File
- ./
og_panels.module, line 256
Code
function og_panels_page($did, $group_node, $title = NULL) {
$og_panel = og_panels_get_one_by_display($did);
// Set breadcrumb and title on non group nodes
if ($title) {
drupal_set_title(check_plain($title));
}
$bc[] = l(t('Home'), "");
$bc[] = l(t('Groups'), "og");
if (!$og_panel->default_page) {
$bc[] = l($group_node->title, "node/{$group_node->nid}");
}
// $bc[] = array('path' => "node/$og_panel->nid/$og_panel->path", 'title' => $og_panel->page_title);
// I tried MSL but it let me down. again.
// menu_set_location($bc);
drupal_set_breadcrumb($bc);
// Mark node as read and show feed icon for any group panel page (how to do this better?)
drupal_add_feed(url("node/{$group_node->nid}/feed"), t('@name at @site', array(
'@name' => $group_node->title,
'@site' => variable_get('site_name', 'drupal'),
)));
node_tag_new($group_node->nid);
$allargs = func_get_args();
$args = array_slice($allargs, 3);
$display = og_panels_load_display($did, $group_node);
$display->args = $args;
$output = panels_render_display($display);
// We print instead of return in order to allow blocks to be suppressed.
print theme('page', $output, $og_panel->show_blocks);
}