You are here

function alpha_pagination_help in Views Alpha Pagination 8.2

Same name and namespace in other branches
  1. 7.2 alpha_pagination.module \alpha_pagination_help()
  2. 7 alpha_pagination.module \alpha_pagination_help()

Implements hook_help().

@todo Remove inline styling.

File

./alpha_pagination.module, line 19
Module hooks and alters for the Views Alpha Pagination module.

Code

function alpha_pagination_help($route_name, RouteMatchInterface $route_match) {
  $output = NULL;
  switch ($route_name) {
    case 'help.page.alpha_pagination':
      $output .= '<h4>' . t('Overview') . '</h4>';
      $output .= t('The Alpha Pagination for Views module enables you to add an alphabetical menu in the header or footer of a views display.');
      $output .= '<div style="border-top: 2px solid #f8981d; margin: 15px 0px; width: 100%"></div>';
      $output .= '<b>' . t('Views Integration and Configuration') . '</b>';
      $output .= '<ol>';
      $output .= '<li>' . t('Build a new view of either users, content (nodes), or comments.') . '</li>';
      $output .= '<li>' . t("Add whatever field you want to use as the basis for the alphabetic grouping (e.g. title, body). You can optionally exclude this field from display if you don't want it to appear in the results shown on the page for some reason. You can only choose a field that is a textfield, textarea or a textarea with a summary.") . '</li>';
      $output .= '<li>' . t('Add either a header or a footer to your view. Select the new item available in the menu of options for Global: Alpha Pagination.') . '</li>';
      $output .= '<li>' . t('Configure how you want alpha_pagination to work and specify where it should appear:');
      $output .= '<ol style="list-style-type: lower-alpha;">';
      $output .= '<li>' . t('set the path to the results view page.') . '</li>';
      $output .= '<li>' . t('select the field you want to use as the basis for the alphabetic grouping from the options presented in the select list (note: if the field you want to use does not appear, go back and add it to your view and then return to this configuration page to select the field).') . '</li>';
      $output .= '<li>' . t('add a context that is the same as the field you wish to use as the basis for alphabetic sorting. Be sure to enable Glossary mode and set the character limit to 1. The transform case option on the URL should be set to Upper Case.') . '</li>';
      $output .= '<li>' . t('by default the alpha pagination will apply to all displays; if you only want the alpha pagination to appear on the current display, use the drop-down menu at the top of the administrative interface to change the setting from "All displays" to "This page (override)".') . '</li>';
      $output .= '</ol>';
      $output .= '<li>' . t("An optional sample view is included and can be enabled via the alpha_pagination_example view. The sample relies on the \\'article\\' default content type. You can create sample content using the devel module or rely on your own data.") . '</li>';
      $output .= '</ol>';
      $output .= '<div style="border-top: 2px solid #f8981d; margin: 15px 0px; width: 100%"></div>';
      $output .= '<h4>' . t('Additional Style Optional') . '</h4>';
      $output .= t('In addition, you can specify the CSS style classes around the paginator, the item list and each item whether or not it is active or inactive. This includes the ability to set a class for linked items (as opposed to items to which have no options and therefor no links).') . '<br /><br />';
      $output .= t('Furthermore, you can add an "ALL" item as well as numeric items and specify their positions in navigation, the label and their respective css class as well.');
      $output .= '<div style="border-top: 2px solid #f8981d; margin: 15px 0px; padding-top: 15px; width: 100%; font-size: 8pt; line-height: 1.3em;">';
      break;
    default:
      break;
  }
  return $output;
}