Posted by hades666evil on June 24, 2009 at 8:13am
I don't figure out how to retrieve the panel's context to modifie the block's content.
Maybe would I better to make a new pane instead a new block ?
It's would be great if I could choose the context and pass arguments form the block setting in panel, like with a view.
Let's imagine I've made a custom block in a custom module like this :
function custom_module_block($op = 'list', $delta = 0, $edit = array()) {
switch($op) {
case 'list': {
$blocs=array();
$blocs['text_block'] = array(
'info' => t('Test block'),
'cache' => BLOCK_CACHE_PER_ROLE | BLOCK_CACHE_PER_PAGE,
);
return $blocs;
}
case 'view': {
$block=array();
if ($delta == 'text_block') {
$contenu = "Test block content";
$block['subject'] = t('Test block');
$block['content'] = $contenu;
}
return $block;
}
}
}Any idea to achieve this ?

Comments
I also want to do something like this...
Hi , I also want to do something like this - did you ever figure it out?
--
Bryan Gruneberg
Chief ninja in charge at Perceptum Thought Squad
Google Talk bryan@perceptum.za.net
Skype perceptum-ts
Figured it out!
http://shellmultimedia.com/articles/creating-content-type-ctools-panels-3
It looks a bit daunting at first - but only took me an hour to get my contextualized block working! Let me know if you need a hand...
Regards
Bryan
--
Bryan Gruneberg
Chief ninja in charge at Perceptum Thought Squad
Google Talk bryan@perceptum.za.net
Skype perceptum-ts