June 2012

Set Views Title Programatically in Drupal 7

function YOUR_MODULE_preprocess_views_view(&$vars) {
  // If it is the view you want to change
  if ($vars['view']->name == 'your_view') {
    // Override view's title, drupal_set_title() was not working
    $vars['view']->build_info['title'] = $my_title;

Create a Numeric Pager for Views Slideshow in Drupal 7

  1. Add a new field to your view.
  2. In the search box type Global
  3. Choose Global: View result counter
  4. Click add and configure field
  5. Uncheck the Create a label checkbox
  6. Check Exclude from display
  7. Click Apply this display
  8. Go to the slideshow settings
  9. Enable the pager in the location of your choice
  10. Choose fields for the pager type
  11. Select the Global: View result counter as the field
  12. Click Apply this display