Drupal Node Render: load full page (scripts, head...everything) -
i have module putting , using code programatically load node , markup:
<?php $node = node_load($nid); $node_view = node_view($node, 'full'); $rendered_node = drupal_render($node_view); echo $rendered_node; ?>
however...whilst gives me themed output of node (the markup node content itself, not page , html template information loaded instance of node) not give me information want. full output of entire themed page includes html tags, head tag , content.
ultimately, standard variables structure present each node load in way, happy settle final markup (at least guaranteed post processing modules etc). of course loading node programatically might not current node being processed page using module, mind unable information require.
is possible? obliged help!
i go way:
$my_page_callback_result = menu_execute_active_handler("node/$nid", false);
have @ array, contains lots of variables, ones need. additionaly, can following rendered html page:
$my_full_html = drupal_deliver_html_page($my_page_callback_result);
both of these functions documented here:
- https://api.drupal.org/api/drupal/includes!common.inc/function/drupal_deliver_html_page/7
- https://api.drupal.org/api/drupal/includes!menu.inc/function/menu_execute_active_handler/7
greets
Comments
Post a Comment