Hi there

Just wondering if anyone can help me

I'm trying to load node/

(ie the drupal default front page) into another node

I'm using the follwong code which works fine with node/number here (e.g node/1)

$MrNode = node_load(array("nid" =>1));
print $MrNode->body;

However I'm trying to load node/

i.e blank the default drupal front page

Any idea of the nid number for the drupal default homepage or is there a different solution?

Thanks

Comments

ahoeben’s picture

How about this?

print node_page_default();

More info:
http://api.drupal.org/api/HEAD/function/node_page_default

trevornz’s picture

Thank you so much or your expert help ahoeben and Heine.

All working perfectly now.

heine’s picture

The default frontpage is not a true node, but an overview page. It is generated by node_page_default().

print $MrNode->body;

Unless you are the only one creating content, best read Writing secure code, esp. the link How to handle text in a secure fashion.
--
The Manual | Troubleshooting FAQ | Tips for posting | Make Backups! | Consider creating a Test site.