Problem/Motivation

In the same way the recurring formatter has the ability to show the next event in a recurring or multivalued date field, it would be ideal if the "next" or "prev" values could be accessed by a token, as well as more generally the past and upcoming values, as well as the rule text.

Proposed resolution

Support tokens that could retrieve the specified values. For exmaple:
[node:field_happening:next:format]
[node:field_happening:prev:format]
[node:field_happening:upcoming:num_to_show:format] - Show a number of upcoming dates (defaults to 10)
[node:field_happening:past:num_to_show:format] - Show a number of past dates (defaults to 10)
[node:field_happening:rule_text] - Text of a recurring event's pattern(s)

Note that in the above examples, the format and num_to_show values are optional.

An alternative that was considered was to look for plus or minus a numerical offset, such as:
[node:field_happening:next-1:format]

I suspect the ability use an arbitrary offset would be of limited usefulness, however, so this approach was deferred.

Comments

mandclu created an issue. See original summary.

  • mandclu committed beb795d on 3.6.x
    Issue #3267299 by mandclu: Token for "next" or "prev" event
    
mandclu’s picture

Title: Token for "next" or "prev" event » Tokens for recurring values
Version: 3.5.x-dev » 3.6.x-dev
Component: Code » Smart Date Recur
Issue summary: View changes
Status: Active » Fixed

Committed a new tokens file for smart_date_recur, with some associated changes to allow code from the SmartDateRecurrenceFormatter to be used statically and without a field formatter configuration.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.