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
Comment #3
mandclu commentedCommitted 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.