I am creating my theme for a corporate drupal site.

Each page needs to have a different image that the user can upload via imagefield when creating a page.
I have given the page content type imagefield and everything displays fine... if I want the image to be within the area that the node is displayed, but that's not what I want.

My node is in the content area in a div #content #content_sub

My header needs to be displayed in #content-header #content-header-inner

What I would love to do is have a block that I can assign to display in content-header and the blocks job would be to display the imagefield from the page that I am currently viewing.

Is there a plugin that does this that I don't know about?

Also, I tried inserting this bit of code: print "<img src=\"".($node->field_headerimage[0][filepath])."\">"; into page.tpl.php and it displays the image... when I insert that code into a block, with input type set to php, I get nothing.

Any thoughts?

Comments

Jeff Burnz’s picture

Perhaps Panels (mini panels) can handle that (used with Views), I think you'd want to using Imagecache as well. I just started messing with Panels recently and theres some good docs on creating a contextual mini panel in the panels documentation.

codigovision’s picture

If anyone is still looking for a way to do this, I created some instructions here http://www.codigovision.com/drupal-6x-upload-image-page-and-display-block . It works great, I'm using it on a few of my sites including www.audiolifestyles.com if you want to see it in action.