I am wanting to place content I made using the content type "Page" in a block. Is there a way to do something like that?

Comments

nevets’s picture

The Nodes In Block module is one possibility (there are others)

roopletheme’s picture

Easy stuff with the Views module. Create a block view, add filters to select your node, and assign the block to a region.

Or you can use straight php code in a block, like:

$nid = 5;
$node = node_load($nid);
print node_view($node, FALSE, TRUE, FALSE);

where $nid is the node ID of the node you want to display.

krymp’s picture

the straight up code in the block is what I was looking for. It works perfect.

Is there a way I can use a title instead of $nid?

Thanks

nevets’s picture

nid is "safer" since it can not be changed while title can be changed. That said this should work

$title = "some title";
$node = node_load(array('title' => $title));