? .completion.db ? .git ? .patch ? drupal_render_cache.php ? drushrc.php ? granular.patch ? tmp.sql ? includes/cache.peruser.inc ? modules/comment/comment-node-type-form.js ? modules/node/node.diff.inc ? modules/node/node.pages-diff.inc ? modules/simpletest/tests/hook_url_rewrite.info ? modules/simpletest/tests/hook_url_rewrite.module ? modules/simpletest/tests/path.test Index: modules/node/node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.module,v retrieving revision 1.1061 diff -u -F^f -p -r1.1061 node.module --- modules/node/node.module 28 May 2009 16:44:06 -0000 1.1061 +++ modules/node/node.module 30 May 2009 03:52:55 -0000 @@ -1335,7 +1335,7 @@ function node_show($node, $message = FAL } /** - * Process variables for node.tpl.php + * Preprocess variables for node.tpl.php * * Most themes utilize their own copy of node.tpl.php. The default is located * inside "modules/node/node.tpl.php". Look in there for the full list of @@ -1346,6 +1346,7 @@ function node_show($node, $message = FAL * - $teaser * - $page * + * @see template_process_node() * @see node.tpl.php */ function template_preprocess_node(&$variables) { @@ -1363,18 +1364,6 @@ function template_preprocess_node(&$vari unset($node->content['links']); } - // Render taxonomy links separately. - $variables['terms'] = !empty($node->content['links']['terms']) ? drupal_render($node->content['links']['terms']) : ''; - - // Render all remaining node links. - $variables['links'] = !empty($node->content['links']) ? drupal_render($node->content['links']) : ''; - - // Render any comments. - $variables['comments'] = !empty($node->content['comments']) ? drupal_render($node->content['comments']) : ''; - - // Render the rest of the node into $content. - $variables['content'] = drupal_render($node->content); - // Flatten the node object's member fields. $variables = array_merge((array)$node, $variables); @@ -1416,6 +1405,32 @@ function template_preprocess_node(&$vari } /** + * Process variables for node.tpl.php + * + * Perform final addition and modification of variables before passing into + * the template. To customize these variables, call drupal_render() on pieces + * of $node->content during THEME_preprocess_node(). + * + * @see template_preprocess_node() + * @see node.tpl.php + */ +function template_process_node(&$variables) { + $node = $variables['node']; + + // Render taxonomy links separately. + $variables['terms'] = !empty($node->content['links']['terms']) ? drupal_render($node->content['links']['terms']) : ''; + + // Render all remaining node links. + $variables['links'] = !empty($node->content['links']) ? drupal_render($node->content['links']) : ''; + + // Render any comments. + $variables['comments'] = !empty($node->content['comments']) ? drupal_render($node->content['comments']) : ''; + + // Render the remaining node content. + $variables['content'] = !empty($node->content) ? drupal_render($node->content) : ''; +} + +/** * Theme a log message. * * @ingroup themeable