By jasonwhat on
I can't believe I'm having so much trouble finding this in search and snippets. I know it is something very simple, but how do I print a specific node using php to call it for inclusion on the front page? In this case I don't want the title or links, just the node content, but that can probably be done in the stylesheet. Any help would be great.
Comments
look at :
look at : http://drupal.org/node/38037
Only prints teaser
I tried this one but only got the teaser.
node_view
http://drupaldocs.org/api/head/function/node_view
node_view($node, $teaser = FALSE, $page = FALSE, $links = TRUE)
Description
Generate a display of the given node.
Parameters
$node A node array or node object.
$teaser Whether to display the teaser only, as on the main page.
$page Whether the node is being displayed by itself as a page.
$links Whether or not to display node links. Links are omitted for node previews.
Return value
An HTML representation of the themed node.
try this..
Jason,
Try this and let me know if it works for you..(change the $node_id to be the Node ID of what you want to display)
Dub
Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate
Not quite
Not sure why. I'm trying to print a "dashboard node" on the frontpage but not having luck. I probably need to keep some of the theming in tact.