[support] Referencing the body field
luca capra
luca.capra at gmail.com
Fri Oct 9 11:22:03 UTC 2009
in node1 body, with php filter
<?php
$node2 = node_load(156);
echo $node2->body;
?>
or in template.php
YOURTHEME_preprocess_node(&$vars, $hook){
$nid = 1; // the nid of node container
if(arg(0)==node && arg(1)==$nid){
$node2 = node_load(156);
$vars['content'] .= $node2->body;
}
}
(then clear the cache in admin/settings/performance)
both should works.
Emma Badger ha scritto:
> I would like to include the content of the body field of node 156 in
> the body of another node using php. Is this easy to do?
>
> Any help would be appreciated.
>
> Regards
>
> Emma
>
>
More information about the support
mailing list