You are here

function classified_view in Classified Ads 7.3

Same name and namespace in other branches
  1. 6.3 classified.module \classified_view()

Implements hook_view().

When building breadcrumbs, assume a tree-structured vocabulary. Non-tree DAGs with multiple parents per term are not supported.

Only build a breadcrumbs trail if terms are defined (they should be).

File

./classified.module, line 1729
A pure D7 classified ads module inspired by the ed_classified module.

Code

function classified_view($node, $view_mode) {
  if ($view_mode == 'full' && node_is_page($node)) {
    drupal_set_breadcrumb(_classified_get_breadcrumb_by_node($node));
  }
  $node->content['expires'] = array(
    '#markup' => theme('classified_expires', array(
      'node' => $node,
    )),
  );
  return $node;
}