I'm trying to display the title with the image in Drupal 7 to be used as a caption for the header. The documentation said that there's a function in the readme.txt file. I found the function in the Drupal 6 version and well...it doesn't work in the D7 version but I guess that was a long shot. Below is the function from the D6 version. If I can just get the D7 equivalent that would be perfect. It would probably help any others who are trying to overwrite the default behaviour and display other fields as well, other than the image.
function phptemplate_headerimage_block($node, $teaser = true) {
if (!$node->status) {
$output = '<div class="node-unpublished">';
}
if (module_exists('taxonomy')) {
$terms = taxonomy_link('taxonomy terms', $node);
}
$output .= t('!title by !name', array('!title' => '<h2 class="title">'. check_plain($node->title) .'</h2>', '!name' => theme('username', $node)));
if (count($terms)) {
$output .= ' <small>('. theme('links', $terms) .')</small><br />';
}
if ($teaser && $node->teaser) {
$output .= $node->teaser;
}
else {
$output .= $node->body;
}
if ($node->links) {
$output .= '<div class="links">'. theme('links', $node->links) .'</div>';
}
if (!$node->status) {
$output .= '</div>';
}
return $output;
}
Closed: works as designed
1.4
Documentation
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.