Cascade Full Calendar: RSS does not pull events from the next year

trattlesr's Avatar

trattlesr

19 Dec, 2013 03:35 PM

RSS currently does not output events that end after the current year. This means that if a user pulls RSS on Dec 20th, 2013 the RSS will not contain events starting Jan 1, 2014 and onward.

I have found what I believe to be the issue.

In the event landing listing format, you include a conditional to detect if a page is outside of a year/month folder structure for the startCal variable, however, for the endCal variable, you do not include this conditional and assume that the list should either end at the end of the current month, or the end of the current year. This can be fixed by adding the extra conditional to the endCal variable, and if the calling file is outside of the month/year structure (as the index page rss is), incrementing the year by 1.

Old Code Line 131 of the event landing listing format

## If the path array size is 2, set the end date to the end of the month. Else, set the end date to the end of the year.
#if ($dateArray.size() == 2)
    $endCal.add(2, 1)
    $endCal.set(5, 0)
#else
    $endCal.set(6, $startCal.getActualMaximum(6))
#end

New Code

## Set the end date based on the current page's location. If no year/month folders exist, we default to one year out.
#if($dateArray.size() > 0)
    ## If the path array size is 2, set the end date to the end of the month.
    ## Else, set the end date to the end of the year.
    #if ($dateArray.size() == 2)
        $endCal.add(2, 1)
        $endCal.set(5, 0)
    #else
        $endCal.set(6, $startCal.getActualMaximum(6))
    #end
#else
    $endCal.add(1, 1)
#end
  1. 1 Posted by Ryan Griffith on 19 Dec, 2013 06:59 PM

    Ryan Griffith's Avatar

    Hi,

    Thank you for the suggestion. I definitely think this would be useful, so I went ahead and added an improvement for this in the Calendar project to track this.

    I'm going to do some additional testing just to double-check and will hopefully get this change out in the near future.

    Thank you again!

  2. Ryan Griffith closed this discussion on 21 Jan, 2014 07:08 PM.

Discussions are closed to public comments.
If you need help with Cascade CMS please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM