Download & Extend

Display editor shouldn't use theme('panels_pane')

Project:Panels
Version:5.x-2.0-beta1
Component:Panel pages
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

Hi, I hope this is th right place for this. I just started looking at Panels 2. It looks fantastic, and just what I want to get context related content into other areas of a page.

If you have a look at http://www.jockcoats.org.uk/ you'll see that in my theme I add a number of divs around my title in order to make it into an expandable yellow button. When I'm not using Panels 2, if I click on the title to go to the node concerned the node.tpl.php implements this arrangement and the title looks the same. But having followed the tutorial at http://drupal.org/node/206185 (which was great - nice and easy to follow - by the way) to create a node override panel page (I hope these terms are in the right order as I'm a bit confused about what a node panel and a page panel are!) I'm not sure where I should be theming that title.

If I use, as was suggested somewhere else, a node-panel-[panel-identifier].tpl.php copied from my node.tpl.php it doesn't affect that title. I can see from node_content.inc (I assume that's right - see code snippet below) where it changes the node title into a block title, and deleted the node title, but I can't for the life of me see where I would theme that.

function panels_content_node_content($conf, $panel_args, $context) {
...
    $block->subject = $node->title;

    unset($node->title);

Have a look at my site and I'm sure the problem will be obvious!

TIA, Jock

Comments

#1

Okay - I spent the day reading the panels module code and assume I have to override the function theme_panels_pane($content, $pane, $display) function from the panels.module file. If that's right, I think this support request can be closed.

Jock

#2

This worked beautifully. However one small glitch that may be intentional but I somehow doubt - if I override the theme_panels_pane() function I don't seem to be able to add content to the pane. I had to restore the default while building the panels page and then restore the override - and I'm not overriding terribly much - just adding divs around the content title field to take fancy background image based wrappers.

#3

Category:support request» bug report

Ok, that's a bug, then. I'll look more deeply into this, but probably the drag & drop page shouldn't be using theme('panels_pane') at all at this point.

#4

Cool - thanks.. I have to say it's very tempting to redesign my whole site based on Panels2 rather than regions and blocks. I presume that should be possible? And, ultimately, is the intention?

#5

Eventually yes, though there still needs to be an app that can use the display for non panels-page pages, and probably needs to be smart enough to add stuff to the administration pages, etc. There are some interesting possibilities here; but it's also very complicated to do right.

#6

But, for instance, it would be fine, right now, to override all the sort of public oriented pages - nodes, pages, comments, users etc and not admin ones? The problem I have is that I have designed in a 50-50 sidebar-content theme when viewed at 800 resolution. It's fine when people have larger resolutions, but at 800 when you have a form in the content area it tends to get squeezed too much by the sidebar. If I controlled the sidebar with panels as well I would use a different override for comment/* to allow it to take up the whole width of the page and have some of the sidebar, if it was even relevant to a comment form page, flow above and below the form. But it certainly looks flexible enough to give lots of possibilities at the moment.

#7

You can currently override a lot of the public pages; I'm not sure about how many of them. Right now Panels only knows about the node form, for example, so it can't currently override the user edit form, which is a big one; and dmitrig01 tried to make a plugin for the comment form but it didn't work. That still needs to be explored.

I think this is something that needs to be tried out so we can identify where the holes are and address them. I haven't actually gone through a simple site to see what's left. But certainly we've got nodes and views covered, which is about 90% of a site, I think.

#8

Title:Theming nodes in panels» Display editor shouldn't use theme('panels_pane')

Fixed issue title.

#9

Hi Jockox3,

Could you distribute here your override function please?
You placed this in template.php ?
Thanks in advance for sharing!

greetings,
Martijn

#10

Status:active» closed (won't fix)

No fixed to be committed to the 2.x line

nobody click here