hook_post_execute

pernaletec's picture

Data updated in views->result does not get rendered

Dear drupalers,

During the hook_post_execute process I'm trying to update some node fields. The idea is to make some calculations using data from views->result and then update the nodes. The node fields I want to update are part of the query too, and at the end of the story I need the data updated rendered.

Below there is an example of the piece of code I'm trying:

<?php
function my_module_views_post_execute(&$view){
if ($view->human_name=='my_view'){
$nid_node = $view->result[0]->nid;
$mynode = node_load($nid_node);

Read more
Subscribe with RSS Syndicate content