You are here

function certificate_node_view in Certificate 8.3

Same name and namespace in other branches
  1. 7.3 certificate.module \certificate_node_view()
  2. 7.2 certificate.module \certificate_node_view()
  3. 4.x certificate.module \certificate_node_view()
  4. 3.x certificate.module \certificate_node_view()

Implements hook_node_view().

File

./certificate.module, line 398
Certificate module.

Code

function certificate_node_view($node, $view_mode, $langcode) {
  if (certificate_can_access_certificate($node)) {

    // Add a download certificate link to the node content.
    $node->content['certificate']['#markup'] = '<span class="certificate-link">' . l(t('Download certificate'), "node/{$node->nid}/certificate") . '</span>';
  }
}