我是 Drupal 7 的新手。
我正在尝试加载其类型和标题作为参数传递的特定节点的数据:
$param = array(
'type' => 'media',
'title' => 'Home Logo Bottom Image',
'status' => 1,
);
// Getting node details
$result = node_load($param);
echo "<pre>";
print_r($result);
stdClass Object
(
[vid] => 1
[uid] => 1
[title] => Career Tip 1
[log] =>
[status] => 1
[comment] => 2
[promote] => 1
[sticky] => 0
[nid] => 1
[type] => career_tips
[language] => und
[created] => 1377871907
[changed] => 1377871907
[tnid] => 0
[translate] => 0
[revision_timestamp] => 1377871907
[revision_uid] => 1
[body] => Array
(
[und] => Array
(
[0] => Array
(
[value] => If you meet a woman doing a STEM job that sounds even remotely interesting to you, see if you can stop by her office for an “informational interview.” At the meeting, ask her every single question you have, even if they seem obvious or silly.
[summary] =>
[format] => full_html
[safe_value] =>
If you meet a woman doing a STEM job that sounds even remotely interesting to you, see if you can stop by her office for an “informational interview.” At the meeting, ask her every single question you have, even if they seem obvious or silly.
[safe_summary] =>
)
)
)
上面代码的输出不正确,因为它显示了其他标题。我在这里缺少什么?
我也想获取同一节点的自定义字段值。那么是否有一个 API 可以返回整个数据?