/**
* Run-time rendering of the body of the block.
*
* @param $subtype
* @param $conf
* Configuration as done at admin time.
* @param $args
* @param $context
* Context - in this case we don't have any.
*
* @return
* An object with at least title and content members.
*/
function tabelle_faelligkeiten_content_type_render($subtype, $conf, $args, $context) {
// Returns the text with proper substitutions.
ctools_context_keyword_substitute('%node:field-xyz %node:title', array(), array($context));
// ...
return $block;
}
?>
Notice: $context is packed into an array, because it is not a list in my case (only one context!) but just a single object. The function expects an array of all contexts to use for substitution.
Important: $context may not be empty! So add the requirement in the content_type $plugin array as described in the simple context example (ctools module example folder):
// ZMP: Requires the node information (symbol base field!)
'required context' => new ctools_context_required(t('Node'), 'node'),
?>