current relationship shipped with og panels does not fullfill all usecases. New relationship could be added called Organic Group node from group post. code would look like this... If such relationship would exist, user could add group node fields to post display.
// $Id:$
/**
* @file
* Implements the group from post relationship for Panels.
*/
/**
* Implementation of hook_ctools_relationships().
*/
function MODULEFILENAME_og_from_post_ctools_relationships() {
return array(
'title' => t('Organic Group from group post'),
'keyword' => 'og',
'description' => t('Adds a OG node from a group post in a node context.'),
'required context' => new ctools_context_required(t('Node'), 'node'),
'context' => 'MODULEFILENAME_og_from_post_context',
);
}
/**
* Return a new ctools context based on an existing context.
*/
function MODULEFILENAME_og_from_post_context($context, $conf) {
// If unset it wants a generic, unfilled context, which is just NULL.
if (empty($context->data)) {
return ctools_context_create_empty('node', NULL);
}
if (isset($context->data)) {
$group = og_determine_context();
return ctools_context_create('node', $group);
}
}