Created
March 30, 2012 03:14
-
-
Save evolvingweb/2246154 to your computer and use it in GitHub Desktop.
hook_node_view()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Implements hook_node_view() | |
* | |
* Adds a note to each article node | |
*/ | |
function mymodule_node_view($node, $view_mode) { | |
if ($node->type == 'article') { | |
$node->content['mymodule_note'] = array(); | |
$node->content['mymodule_note']['#markup'] = | |
t('My Module Was Here!'); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment