You are here

function _nd_preprocess_node in Node displays 6.3

Same name and namespace in other branches
  1. 6 nd.module \_nd_preprocess_node()
  2. 6.2 nd.module \_nd_preprocess_node()
  3. 7 nd.module \_nd_preprocess_node()

Helper function used in either nd_preprocess_node or other preprocess function.

1 call to _nd_preprocess_node()
nd_preprocess_node in ./nd.module
Implementation of moduleName_preprocess_hook(). The node data will be rendered in regions. This uses a helper function so themers/developers can call that helper function from within their preprocess_hooks if they are fiddling with some data. For…

File

./nd.module, line 280
Node displays.

Code

function _nd_preprocess_node(&$vars, $hook) {
  $node = $vars['node'];

  // Break all the rendering if needed.
  if (!$node->render_by_ds) {
    return;
  }

  // Add nd-content_type-build_mode(-nid) template suggestion.
  $vars['template_files'][] = 'nd';
  $vars['template_files'][] = 'nd-' . $node->type;
  $vars['template_files'][] = 'nd-' . $node->type . '-' . $node->build_mode;
  $vars['template_files'][] = 'nd-' . $node->type . '-' . $node->build_mode . '-' . $node->nid;
  $vars['content'] = ds_render_content($node, 'nd', $vars);
}