Error message

You are browsing documentation for drupal 7.x, which is not supported anymore. Read the updated version of this page for drupal 11.x (the latest version).

function node_block_view

Implements hook_block_view().

File

modules/node/node.module, line 2252

Code

function node_block_view ($delta = '') {
 $block = array();
 switch ($delta) {
 case 'syndicate':
 $block['subject'] = t ('Syndicate');
 $block['content'] = theme ('feed_icon', array(
 'url' => 'rss.xml',
 'title' => t ('Syndicate'),
 ));
 break;
 case 'recent':
 if (user_access ('access content')) {
 $block['subject'] = t ('Recent content');
 if ($nodes = node_get_recent (variable_get ('node_recent_block_count', 10))) {
 $block['content'] = theme ('node_recent_block', array(
 'nodes' => $nodes,
 ));
 }
 else {
 $block['content'] = t ('No content available.');
 }
 }
 break;
 }
 return $block;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.