Skip to content
Snippets Groups Projects
Commit 554947e3 authored by moshe weitzman's avatar moshe weitzman
Browse files

use og context system for setting up a group context in panels. is a bit smarter this way.

parent 470447fa
No related branches found
No related tags found
No related merge requests found
......@@ -15,10 +15,7 @@ function panels_group_from_node_context($context = NULL, $conf) {
return panels_context_create_empty('group', NULL);
}
// TODO: Just returns the first group as the context.
if (isset($context->data->og_groups)) {
foreach ($context->data->og_groups as $gid) {
return panels_context_create('group', node_load($gid));
}
if ($group = og_get_group_context()) {
return panels_context_create('group', $group);
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment