So this is the hook for node view later.
function hook_node_view_alter(&$build) {
// Code
}
To use that hook...
/**
* Implements hook_node_view_alter().
*/
function my_module_node_view_alter(&$build) {
// Example of how to create a variable.
$vid = $build['body']['#object']['vid’];
// Create a placeholder for original vid value.
$build['body']['#object']['original_vid'] = $vid;
// Reset the value of vid.
$build['body']['#object']['vid’] = NEW_VALUE;
}
Yes! that's it, thank you!
i had tried something like that earlier but not exactly. something like
$myVar = $build['body']['#object']->'vid';
honestly since starting Drupal 2 years ago my PHP hand coding has gotten worse since all the work i've done is within the admin almost,
i'm forgetting OOP PHP!
i'm now starting to work on making modules too.
where are you located? thanks for the help, maybe we can stay in touch