This module provides so much flexibility, it is a shame that we still have to display the Title at the top of the panel.
As a web designer, there are so many instances where I want the title somewhere else. The most common being in a two column layout where you want an image in column 1 and the Title and description _beside_ it in column 2.
As a work around I have been creating a custom PHP block called 'Content title', with the following code:
<?php
$node = node_load(arg(1));
print '<h1 class="pane-title">'. $node->title .'</h1>';
?>
And dropping it into my node override panels, but it seems like it should be one of the native items.
Sure would make it easier to design sites that don't look so Drupal-ish.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | panels-DRUPAL-5--2.node-meta.patch | 5.08 KB | sun |
Comments
Comment #1
sdboyer commentedSo, I can see a use case for something like this. But there are a few problems.
Title location is a theme layer issue, not a panels issue, so I don't see how Panels can be faulted for the location of the title. With all the problems we have with title generation right now, the idea of doing something more to complicate the situation makes me a little queasy.
More importantly, though, the code snippet you've put here is...well, the wrong way to go about doing this. If it's going to be a native part of Panels, then it needs to be written up as a panels content type plugin, not as a php snippet. Also, a simple, single line of text isn't something that fits clearly into one of the existing pane type categories for me, so I'd need to think about how to categorize it within the existing scheme before committing it.
Comment #2
sdboyer commentedComment #3
sunHell yeah! Awesome idea!
Attached patch introduces a new content type for outputting node meta data. That is, a node's title, author, creation date, and modification date for now.
Please don't bother with the included User Display API support. I'll post a subsequent patch for all other Panels content-types that output a user name and/or picture soon.
Additionally, it seems a few existing content-types need an E^ALL fix as contained in the first lines of panels_admin_edit_node_meta()...
Comment #4
zach harkey commentedSun, this rules. I tested it and it works perfectly.
At this point I don't see what is stopping us from dropping the local task tabs on here too, giving us complete control over the entire display of node pages.
Comment #5
sunWell, local tasks do not belong to nodes (but menu instead), so this would not be the appropriate Panels content-type. I agree, this would make sense, but should definitely be treated in another issue.
Comment #6
merlinofchaos commentedWhat if we included weights so that the user can specify the order? (In D6 that can convert to a tabledrag; in D5 we can stick with annoying weights).
It also seems like maybe this needs to be expandable. Not entirely sure the best way to do it, though.
Comment #7
sunIMHO, both of your points are actually feature requests that could be based on this content-type after it has been committed. Both would be nice to have, but OTOH I'd prefer to wait for actual demand for that from users first.
Comment #8
sdboyer commentedCommitted, after some small cleanups. Thanks sun!
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #10
OpenChimp commentedI think it would be great to also add the node links to this. Anyone agree or disagree?
Comment #11
sunFunny, I just thought and needed the same a few minutes ago.
A quick search reveals: #253433: Add node links to node context?
Comment #12
ChrisBryant commentedAgreed that #253433: Add node links to node context? would make sense to go with this. Should this ticket be re-opened or should we just continue it on the other ticket?
Comment #13
sunThis one is dead. The other lives.