You are here

function _nd_preprocess_node in Node displays 7

Same name and namespace in other branches
  1. 6.3 nd.module \_nd_preprocess_node()
  2. 6 nd.module \_nd_preprocess_node()
  3. 6.2 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 208
Node displays.

Code

function _nd_preprocess_node(&$vars, $hook) {

  //dsm($vars);

  // @todo : revise al this stuff, the nd template is found, but
  // let's find out the other suggestions and rollback to node template file.
  $node = $vars['node'];

  //dsm($vars['theme_hook_suggestions']);
  array_unshift($vars['theme_hook_suggestions'], 'nd');

  // Add nd-content_type-build_mode(-nid) template suggestion.

  /*$vars['theme_hook_suggestions'][] = 'nd';
    $vars['theme_hook_suggestions'][] = 'nd-' . $node->type;
    $vars['theme_hook_suggestions'][] = 'nd-' . $node->type . '-' . $node->build_mode;
    $vars['theme_hook_suggestions'][] = 'nd-' . $node->type . '-' . $node->build_mode . '-' . $node->nid;*/

  //dsm($vars['theme_hook_suggestions']);

  // Break all the rendering if needed.
  if (!$node->render_by_ds) {
    $vars['template_files'][] = 'node';
    return;
  }
  $content = ds_render_content($node, 'nd', $vars);
  $vars['content'] = $content;
}