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.

CommentFileSizeAuthor
#3 panels-DRUPAL-5--2.node-meta.patch5.08 KBsun

Comments

sdboyer’s picture

So, 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.

sdboyer’s picture

Status: Active » Needs work
sun’s picture

Version: 5.x-2.0-beta5 » 5.x-2.x-dev
Component: Plugins - contexts » Plugins - content types
Assigned: Unassigned » sun
Status: Needs work » Needs review
StatusFileSize
new5.08 KB

Hell 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()...

zach harkey’s picture

Sun, 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.

sun’s picture

Title: Allow 'Title' to be independently placed - like the other Node context fields » Add node meta data content-type
Status: Needs review » Reviewed & tested by the community

Well, 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.

merlinofchaos’s picture

What 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.

sun’s picture

IMHO, 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.

sdboyer’s picture

Status: Reviewed & tested by the community » Fixed

Committed, after some small cleanups. Thanks sun!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

OpenChimp’s picture

I think it would be great to also add the node links to this. Anyone agree or disagree?

sun’s picture

Funny, I just thought and needed the same a few minutes ago.

A quick search reveals: #253433: Add node links to node context?

ChrisBryant’s picture

Agreed 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?

sun’s picture

This one is dead. The other lives.