[support] how to embed a node inside another node
    Jonathan Hedstrom 
    jhedstrom at opensourcery.com
       
    Tue Sep 16 21:27:08 UTC 2008
    
    
  
Ámon Tamás wrote:
> 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).
A more complete method would use node_view, since the above method won't
properly render content from other modules (such as cck)
<?php
  $node = node_load(15);
  echo $node->title;
  echo node_view($node);
?>
http://api.drupal.org/api/function/node_view/6
Cheers,
Jonathan
-- 
Jonathan Hedstrom                                     OpenSourcery
http://opensourcery.com                        Technology for Good
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.drupal.org/pipermail/support/attachments/20080916/ad7f7264/attachment.pgp 
    
    
More information about the support
mailing list