我在cck字段中存储一个字符串。 问题是把它拿出来。我有一个node-node_type.tpl.php并询问它
$node->content['field_custom_map_data']['#value']
它返回HTML,三个嵌套的DIV,并使用HTML实体,我希望输入纯文本。
Drupal 5解决这个问题的方法是什么?
我找到了脱机帮助。 Drupal不能这样做,但是我可以使用php函数html_entity_decode去掉实体,去掉标记的标记。 不管怎样,还是谢谢你!
我对Drupal 6非常熟悉,但你有没有尝试过将 $node->content['field_custom_map_data'] ?如果我没记错的话,应该有一把钥匙 #raw ,以便使用 $node->content['field_custom_map_data']['#raw'] 获取值。
$node->content['field_custom_map_data']
#raw
$node->content['field_custom_map_data']['#raw']