我想在日历模块中使用cck字段作为td的类名:
例如,从calendar-month.tpl.php:
<td id=" <?php print $cell['id']; ?>" class="<?php print $cell['class']; ?> <?php print $fields['field_eventtype_value']->content ?> ">
如何从视图中获取字段“EventType”值以便使用它?上面没有输出字段“事件类型”值的任何内容。
谢谢:)
node_load
$nid = 1; // Or what node you need to get. $node = node_load($nid); $class = $node->field_eventtype_value['#value'];