You are here

function views_handler_field_node_page_title::init in Page Title 7.2

Same name and namespace in other branches
  1. 8.2 views_handler_field_node_page_title.inc \views_handler_field_node_page_title::init()

We need to tweak the init() - if we fallback to title, ensure title is in the query!

Overrides views_handler_field_node::init

File

./views_handler_field_node_page_title.inc, line 18
Contains the Views field handler for the Page Title field.

Class

views_handler_field_node_page_title
Field handler to provide simple renderer that allows linking to a node.

Code

function init(&$view, &$options) {
  parent::init($view, $options);
  if (!empty($this->options['use_node_title'])) {
    $this->additional_fields['title'] = array(
      'table' => 'node',
      'field' => 'title',
    );
  }
}