[support] how to embed a node inside another node

Ámon Tamás amont at 5net.hu
Sat Sep 13 07:29:26 UTC 2008


The php code is the:
<?php
$node = node_load(15);
echo $node->title;
echo $node->body
?>

The $node variable is an object. You can see the elemnts of this with 
the print_r or var_dump function. The node_loads parameter is the node 
id (nid).

More information about it: http://api.drupal.org/api/function/node_load/6

geniekids írta:
> 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


Ámon Tamás
Sitefejlesztő és programozó
-- 
5NET Informatikai Kft.
1062 Budapest, Aradi utca 38. A 3/11
telefon: (1) 461-0205  |  fax: (1) 461-0206
e-mail: amont at 5net.hu  |  web: http://www.5net.hu


More information about the support mailing list