diff --git handlers/views_handler_field.inc handlers/views_handler_field.inc index 6d01f73..66070ff 100644 --- handlers/views_handler_field.inc +++ handlers/views_handler_field.inc @@ -17,6 +17,7 @@ * 'field' => fieldname); as many fields as are necessary * may be in this array. * - click sortable: If TRUE, this field may be click sorted. + * - no semantic: If TRUE, it disables the semantic output. */ class views_handler_field extends views_handler { var $field_alias = 'unknown'; @@ -136,12 +137,24 @@ class views_handler_field extends views_handler { * Return DIV or SPAN based upon the field's element type. */ function element_type() { + if ($this->options['element type']) { + return $this->options['element type']; + } if (isset($this->definition['element type'])) { return $this->definition['element type']; } return 'span'; } + + /** + * Return the class of the field. + */ + function classes() { + if ($this->options['class']) { + return $this->options['class']; + } + } function option_definition() { $options = parent::option_definition(); @@ -167,6 +180,8 @@ class views_handler_field extends views_handler { 'html' => array('default' => FALSE), ), ); + $options['class'] = array('default' => ''); + $options['element type'] = array('default' => ''); $options['empty'] = array('default' => '', 'translatable' => TRUE); $options['hide_empty'] = array('default' => FALSE); $options['empty_zero'] = array('default' => FALSE); @@ -193,6 +208,22 @@ class views_handler_field extends views_handler { '#default_value' => $this->options['exclude'], '#description' => t('Check this box to not display this field, but still load it in the view. Use this option to not show a grouping field in each record, or when doing advanced theming.'), ); + $form['element type'] = array( + '#prefix' => '