function hook_certificate_template_id_alter in Certificate 8.3
Same name and namespace in other branches
- 6.2 certificate.api.php \hook_certificate_template_id_alter()
- 6 certificate.api.php \hook_certificate_template_id_alter()
- 7.3 certificate.api.php \hook_certificate_template_id_alter()
- 7.2 certificate.api.php \hook_certificate_template_id_alter()
- 4.x certificate.api.php \hook_certificate_template_id_alter()
- 3.x certificate.api.php \hook_certificate_template_id_alter()
Implementation of certificate_template_id_alter().
Single the template ID that will be loaded when the user downloads a certificate.
1 invocation of hook_certificate_template_id_alter()
- certificate_single in ./
certificate.pages.inc - Generate a single certificate.
File
- ./
certificate.api.php, line 33 - certificate.api.php Document certificate hooks.
Code
function hook_certificate_template_id_alter(&$template_id, $node, $user) {
if ($node->nid % 2 == 0) {
// Set certificate to use node 476 when the node NID is even.
$template_id = 476;
}
}