block template for pane

Events happening in the community are now at Drupal community events on www.drupal.org.
kha's picture

I haven't found a solution in this group so far, so let's open a discussion.
On a site wurrently under development, we still haven't decided whether we will user panels or not. Our design's CSS are quite complex, abnd before switchcing, we want to be 100% sure that we wll be able to fully control the rendering.
We currently have developed block-module-delta.tpl.php for each block to be displayed, using standard Drupal blocks management interface. Now, the problem is that the customer would like to have a specific block order for each page. This, to our knowledge doesn"t seem to be possible. So, beside planning a blick_list rewriting with a drag'n drop interface, we are, again, considering Panels 2, since this issue is clearly well managed by the module.
My question is the following:

How to force panels 2, to call our block template block-module-delta.tpl.php ?

We have tried something like $vars['template_files'] = array('page-article'); but I can't have it work.

Any idea ?

Thanks in adavce,

kha

Comments

have the same problem.

FlymastaFlex's picture

I also cant find this out, but i am in urgent need of this.
Do you already have a answer for this problem ?

this could help:

FlymastaFlex's picture

I think this could help you.
Its not super-elegant, but also its not much work or circumstances...

http://drupal.org/node/249884

The problem has been solved

kha's picture

We have finaly found how to do it properly, by our own.

The solution was actually very simple as we used phptemplate_panels_pane. Calling the theme, automatically invoked the tpl.php templates.

function phptemplate_panels_pane($content, $pane, $display) {
  //drupal_set_message('DEBUG theme pane pane: '.print_r($pane, TRUE).'');
  //drupal_set_message('DEBUG theme pane display: '.print_r($display, TRUE).'');
  //drupal_set_message('DEBUG theme pane content: '.print_r($content, TRUE).'');
  //drupal_set_message('DEBUG theme pane css_class: '.$content->css_class);
  //if (strstr($content->css_class, 'paneasblock')) {
  if ($pane->type == 'block') {
    if (!empty($content->content)) {
      $content->subject = $content->title  ;
      return theme('block', $content);
    }
    return;
  }
  return theme_panels_pane($content, $pane, $display);
}

subscribing

sharique's picture

subscribing

Sharique uddin Ahmed Farooqui

Sharique Ahmed Farooqui

Panels

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: