'url'); return $options; } function query() { if ($this->options['display_url'] == 'title') { $this->additional_fields['title'] = array('table' => 'node', 'field' => 'title'); } parent::query(); } /** * Provide link to the page being visited. */ function options_form(&$form, &$form_state) { parent::options_form($form, $form_state); $form['display_url'] = array( '#title' => t('Display'), '#type' => 'select', '#options' => array( 'title' => t("Node title as link"), 'url' => t('URL as link'), 'text' => t('URL as plain text'), ), '#default_value' => $this->options['display_url'], ); } function render($values) { $value = $values->{$this->field_alias}; if ($this->options['display_url'] == 'title') { return l($values->{$this->aliases['title']}, $value); } if ($this->options['display_url'] == 'url') { return l($value, $value); } return $value; } }