This prints the body and title of node:
<?php
$title = db_result(db_query("select title from {node} where nid=159;"));
$body = db_result(db_query("select body, vid from {node_revisions} where vid=(select vid from {node} where nid=159);"));
print "<p><b>" . $title . "</b><br />"; print $body . "</p>"; ?>
Quoting geniekids ratadi2@gmail.com:
What is the php code for embedding (the contents) of a node inside another node?
i guess this must one of the most basic phop code - but them i am zero in php - so need help.
what i want is to create a page then then embed that in many other pages (child pages of many books) so that when i update this page - it automatically get updated in all the places where it is embedded.
I know i can put a hyper link - but in some cases i don't want the reader to go away from a page - and read a specific content right there. thanks in advance
ratnesh
View this message in context: http://www.nabble.com/how-to-embed-a-node-inside-another-node-tp19468065p194... Sent from the Drupal - Support mailing list archive at Nabble.com.
-- [ Drupal support list | http://lists.drupal.org/ ]