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
Comment #1
merlinofchaos commentedIf you choose 'system block' it'll go through block.tpl.php and therefore get the block-* suggestions as well.
Comment #2
sjancich commentedAh. 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!
Comment #3
merlinofchaos commentedRight. 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.
Comment #4
merlinofchaos commentedComment #6
greg.harveyHi,
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?
Comment #7
merlinofchaos commentedHave you tried theme_panels_pane?
Comment #8
greg.harveyDoh! No. I'll look at that and come back.
Thanks! =)
Comment #9
greg.harveyLooks 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? =)
Comment #10
merlinofchaos commentedIt contains as much or more info as $block will in block.tpl.php
Comment #12
subir_ghoshMerlin:
Under which head do I get the "system block"?
Tks.
EDIT: Found it "Style --> Change" . Tks.