Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar - Improvement: Increase maximum number of events that can be displayed on the main calendar #5

Open
megoconnor opened this issue Jun 15, 2020 · 5 comments

Comments

@megoconnor
Copy link

Description

Once you have more than 100 events (pages with the Event Content Type), the main calendar will stop displaying new events because the default maximum number of results returned in the _cms/formats/outputs/xml/events-xml query is 100.

Workaround

Add a maxResults parameter to the _cms/formats/outputs/xml/events-xml query strings at approximately Lines 5-9:

#if($currentPageSiteName == $mainCalendarSiteName)
    #set ($allEvents = $_.query().byContentType("site://${mainCalendarSiteName}/Event").sortBy("startDate").searchAcrossAllSites().maxResults(-1).execute())
#else 
    #set ($allEvents = $_.query().byContentType("site://${mainCalendarSiteName}/Event").sortBy("startDate").siteName($currentPageSiteName).maxResults(-1).execute())
#end

Note: .maxResults(-1) will return the maximum number of assets permitted which is currently 2000 assets but you can set this to a lower integer if needed. Also consider archiving or deleting older events to save rendering time on the full calendar.

@megoconnor megoconnor changed the title Calendar - Improvement: Increase total number of events that can be displayed on the main calendar Calendar - Improvement: Increase maximum number of events that can be displayed on the main calendar Jun 16, 2020
@megoconnor
Copy link
Author

megoconnor commented Jun 16, 2020

Conversation # 27500638006

@timreilly
Copy link
Member

timreilly commented Jun 16, 2020

Ticket 12620

@megoconnor
Copy link
Author

Ticket 13772

@megoconnor
Copy link
Author

Conversation 69364500004585

@timreilly
Copy link
Member

Ticket 13872

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants