Hi, I needed an option in a project to set a custom range on the Date views pager argument - eg. page by 5 day ranges. I've added this option to the date_views_pager, patch attached.

If the range is left blank, default behaviour applies. NB range is added to min_date - so to emulate weekly date pager (but starting on argument date instead of a Sunday), enter a range "6 days".

Comments

bgilhome created an issue. See original summary.

bgilhome’s picture

bgilhome’s picture

NB untested with 'skip empty pages' option.

chris matthews’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll, +Needs rework

The 3 year old patch to date_views_plugin_pager.inc and theme.inc does not apply to the latest 7.x-2.x-dev and may be too old to reroll, but I went ahead and tagged the issue accordingly.

Checking patch date_views/includes/date_views_plugin_pager.inc...
error: while searching for:
   * Tell Views what this pager's setting is.
   */
  function summary_title() {
    return t("Position: @position, format: @format.", array('@position' => $this->options['pager_position'], '@format' => $this->options['link_format']));
  }

  /**

error: patch failed: date_views/includes/date_views_plugin_pager.inc:90
error: date_views/includes/date_views_plugin_pager.inc: patch does not apply
Checking patch date_views/theme/theme.inc...
error: while searching for:
      $next_title = t('Navigate to next day');
      break;
  }
  $vars['prev_options']['attributes'] += array('title' => $prev_title);
  $vars['next_options']['attributes'] += array('title' => $next_title);

error: patch failed: date_views/theme/theme.inc:145
error: date_views/theme/theme.inc: patch does not apply