You are here

function template_preprocess_headerimage_block in Header image 6

Same name and namespace in other branches
  1. 7 headerimage.module \template_preprocess_headerimage_block()

Process variables to format the headerimage block.

$variables contains:

  • $node
  • $teaser: TRUE = display node as teaser; FALSE = display full node

See also

headerimage-block.tpl.php

File

./headerimage.module, line 693
headerimage.module Conditionally display an node in a block.

Code

function template_preprocess_headerimage_block(&$variables) {
  $node = $variables['node'];
  $teaser = $variables['teaser'];
  $variables['unpublished'] = !$node->status;
  if ($teaser && isset($node->teaser)) {
    $variables['content'] = $node->teaser;
  }
  else {
    $variables['content'] = $node->body;
  }
}