I think it would be useful to override a panel pane's theme through a tpl file. Ideally, Panels 3 would allow a user to select a custom-defined theme under the Pane Style settings. Along with "no style," "rounded corners" and "system block," it would be great if you could select a theme-specific pane style after placing a correctly named tpl file in your theme folder.

At the moment I've gotten around this by selecting "no style" and putting an override of theme_panels_pane in my template.php file. I suspect (but haven't tried) I could also select "system block" from pane settings and put some logic in my block.tpl file to test whether the block is being built by the panels module.

What I have noticed is that if another module is building a block that I include as a pane on a panel page, my block-othermodule.tpl.php file isn't being used. Not necessarily a bad thing, but a little documentation on this couldn't hurt.

Thanks so much for the fabulous module. Panels 3 is excellent and I really appreciate all of your work.

Comments

merlinofchaos’s picture

If you choose 'system block' it'll go through block.tpl.php and therefore get the block-* suggestions as well.

sjancich’s picture

Ah. I see. I was hoping to theme just the instance of the block as a panel pane through block-panel.tpl.php (or some such). Thanks for your reply!

merlinofchaos’s picture

Right. At the moment, that does not happen. I think before a full release, we may start offering panel-pane.tpl.php with similar suggestions as block. This may alleviate things a little bit.

merlinofchaos’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

greg.harvey’s picture

Version: 6.x-3.0-beta1 » 6.x-3.0
Status: Closed (fixed) » Active

Hi,

Thought I'd bump this rather than starting a new issue. I've been digging around for a way to inject some mark-up in to an individual panel pane for theming purposes and come up with very little. I found this request here:
http://drupal.org/node/334209#comment-1173430

Which prompted me to change my search criteria and caused me to stumble in here. Regarding #3, I'm *guessing* that hasn't happened yet? I actually sat in on the Panels 3 session at DrupalCon Paris, but I didn't take notes and the videos aren't up yet, so I can't remember what was said as regards templates and theming panes. Are there pane templates yet?

merlinofchaos’s picture

Have you tried theme_panels_pane?

greg.harvey’s picture

Doh! No. I'll look at that and come back.

Thanks! =)

greg.harvey’s picture

Looks good. Haven't had chance to play with it yet (on a non-Panels job right now) but I guess the $pane object contains enough info to select a pane and theme it accordingly? =)

merlinofchaos’s picture

Status: Active » Fixed

It contains as much or more info as $block will in block.tpl.php

Status: Fixed » Closed (fixed)

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

subir_ghosh’s picture

Component: Display rendering » Code

Merlin:

Under which head do I get the "system block"?

Tks.

EDIT: Found it "Style --> Change" . Tks.