- Drupal CMS Developer
- Website speed optimisation
- Drupal 6 to Drupal 8 migrations
Drupal - completely render another node including hooks
If you need to completely load another node in a module which includes the content element of the node object then use the following code...
<?php
$node = node_load($nid);
$node->build_mode = 'full node';
$node = node_build_content($node);
drupal_render($node->content);
content_alter($node);
?>
Just replace $nid with your node id that you want to render and your $node is ready to go.
- Scripts: