function views_simple_pager::options_form in Views Simple Pager 7
Provide the default form for setting options.
Overrides views_plugin::options_form
File
- ./
views_simple_pager.views.inc, line 78 - Views plugin implementations for Views Simple Pager.
Class
- views_simple_pager
- The plugin to provide the Views Simple Pager.
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$pager_text = $this->display->handler
->get_pager_text();
$form['items_per_page'] = array(
'#title' => $pager_text['items per page title'],
'#type' => 'textfield',
'#description' => $pager_text['items per page description'],
'#default_value' => $this->options['items_per_page'],
);
$form['offset'] = array(
'#type' => 'textfield',
'#title' => t('Offset'),
'#description' => t('The number of items to skip. For example, if this field is 3, the first 3 items will be skipped and not displayed.'),
'#default_value' => $this->options['offset'],
);
$form['id'] = array(
'#type' => 'textfield',
'#title' => t('Pager ID'),
'#description' => t("Unless you're experiencing problems with pagers related to this view, you should leave this at 0. If using multiple pagers on one page you may need to set this number to a higher value so as not to conflict within the ?page= array. Large values will add a lot of commas to your URLs, so avoid if possible."),
'#default_value' => $this->options['id'],
);
$form['total_pages'] = array(
'#type' => 'textfield',
'#title' => t('Number of pages'),
'#description' => t('The total number of pages. Leave empty to show all pages.'),
'#default_value' => $this->options['total_pages'],
);
$form['prev_label'] = array(
'#type' => 'textfield',
'#title' => t('Label for "previous" pager link'),
'#description' => t('The label to use for the traditional "previous" link that traverses towards the top of the list.'),
'#default_value' => $this->options['prev_label'],
);
$form['next_label'] = array(
'#type' => 'textfield',
'#title' => t('Label for "next" pager link'),
'#description' => t('The label to use for the traditional "next" link that traverses towards the bottom of the list.'),
'#default_value' => $this->options['next_label'],
);
$form['reverse_links'] = array(
'#type' => 'checkbox',
'#title' => t('Reverse placement of "previous" and "next" links'),
'#description' => t('If checked, this option will reverse the "traditional" link layout (i.e. "next" will come first, then "previous")'),
'#default_value' => $this->options['reverse_links'],
);
}