Project:Panels
Version:6.x-3.3
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Hi:

Has anyone had success with Panels 2 and blocktheme. I have a panels one implementation that works wonderfully with BlockTheme however when I upgrade to Panels 2, the blocktheme settings are completely ignored.

I am likely missing a setting somewhere but wanted to check here.

Thanks

Comments

#1

Status:active» fixed

Panels 2 no longer runs things through theme('block') by default, but you can override theme_panels_pane() and set it up so that it does.

#2

Thanks for the fast response.

Any tips on how I can figure out how to override theme_panels_pane?

Thanks again.

#3

It's actually quite easy. Here's a snippet I have running on another site for this:

<?php
function phptemplate_panels_pane($content, $pane, $display) {
  if (!empty(
$content->title)) { $content->subject = $content->title; }
  return
theme('block', $content);
}
?>

#4

Thanks! Works like a charm.

#5

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

#6

I know drupalers will not understand why this is a problem for me but the fact is that i have exactly the above problem but don't know where to put the code snippet.
Will be most grateful if somebody can help me.
Thanks.

#7

Version:5.x-2.0-beta3» 6.x-2.0-alpha3

is this code working for panels 6.x-2.0-alpha3 and Block Theme 6.x-1.0-beta1 ??



<?php
function phptemplate_panels_pane($content, $pane, $display) {
  if (!empty(
$content->title)) { $content->subject = $content->title; }
  return
theme('block', $content);
}
?>

thank you

#8

Version:6.x-2.0-alpha3» 6.x-3.3
Status:closed (fixed)» active

Is there any update on this for Panels 3? I'm looking at it now, but if someone already knows the answer it'll save me some time. Naturally, I'll post back if I get there first. =)

#9

Strange - looking at the code, the plugins/styles/block.inc file contains a function called theme_panels_block_style_render_pane() which *appears* to theme a block in the normal way on output:

<?php
/**
* Render callback.
*
* @ingroup themeable
*/
function theme_panels_block_style_render_pane($content, $pane, $display) {
  if (empty(
$content->content)) {
    return;
  }

  if (!empty(
$content->title)) {
   
$content->subject = $content->title;
  }

 
$content->region = $pane->panel;
  if (!isset(
$content->module)) {
   
$content->module = $content->type;
  }
  if (!isset(
$content->delta)) {
   
$content->delta = $content->subtype;
  }

  return
theme('block', $content);
}
?>

But BlockTheme is not working on panel pages, so clearly I'm missing something. Will keep digging. =/

#10

Status:active» closed (fixed)

Got it! Once you add your content you need to go to the "Style" option on the context menu for that pane and set it to "System block". Then the block.inc plug-in is invoked, the output is treated as a normal block and the BlockTheme module does it's thing.

nobody click here