【发布时间】:2010-03-19 12:16:15
【问题描述】:
似乎无法弄清楚我如何获取节点引用字段的多个 nid。
$node->field_name[0]['nid'] 获取 cck 节点引用字段的节点 id。
但是,当 cck 节点引用字段有多个值时,我会卡住!
我的 php 有点粗略 atm,所以使用数组和循环非常困难!
这是我的代码:
<?php foreach ((array)$node->field_industry as $item) { ?>
<li><a href="../industry/company/<?php print --NODEID--?>"><?php print $item['view'] ?></a></li>
<?php } ?>
【问题讨论】:
标签: php reference drupal-6 cck