function views_handler_field_node_page_title::options_form in Page Title 7.2
Same name and namespace in other branches
- 8.2 views_handler_field_node_page_title.inc \views_handler_field_node_page_title::options_form()
- 6.2 views_handler_field_node_page_title.inc \views_handler_field_node_page_title::options_form()
Provide link to node option and fallback to node title option.
Overrides views_handler_field_node::options_form
File
- ./
views_handler_field_node_page_title.inc, line 42 - 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 options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form['link_to_node'] = array(
'#title' => t('Link this field to its node'),
'#description' => t('This will override any other link you have set.'),
'#type' => 'checkbox',
'#default_value' => !empty($this->options['link_to_node']),
);
// Page Title: Adding the form field for the node title fallback option.
$form['use_node_title'] = array(
'#title' => t('Fall back on to Node: Title'),
'#description' => t('If no Page Title is set for a node then the normal node title will be used instead.'),
'#type' => 'checkbox',
'#default_value' => !empty($this->options['use_node_title']),
);
}