A simplified node load with just the CCK fields
This is how you can make a simplified node load function just for CCK fields to avoid all invoke calls.
<?php
/**
* A simplified node load function with just CCK fields
*
* @param unknown_type $node_nid
* @return unknown
*/
function simple_load($node_nid) {
$node = new stdClass();
$node->nid = $node_nid;
$node_info = db_fetch_object(db_query("SELECT vid, type, title FROM {node} WHERE nid = %d", $node_nid));
$node->vid = $node_info->vid;
$node->type = $node_info->type;
$node->title = $node_info->title;
$content = content_storage('load', $node);
foreach ($content as $key => $value) {
$node->$key = $value;
}
return $node;
}
?>Knowledge keywords:
