原文: http://drupalchina.org/node/3012#comment-8596
<?php function phptemplate_views_handle_field_node_title($fields, $field, $data) { $info = $fields[$field['fullname']]; if ($field['handler'] && function_exists($field['handler'])) { $title = $data->$field['queryname']; if (drupal_strlen($title)>20) { $title = drupal_substr($title, 0, 20)."..."; } return $field['handler']($info, $field, $title, $data); } if ($info['handler'] && is_string($info['handler']) && function_exists($info['handler'])) { return $info['handler']($info, $field, $data->$field['queryname'], $data); } return check_plain($data->$field['queryname']); } ?>
没有评论:
发表评论