ASPX templates
Version 5.x > ASPX templates > Showing event capacity on calendar / overview page View modes: 
User avatar
Member
Member
jenf-deschutes - 12/19/2011 6:39:42 PM
   
Showing event capacity on calendar / overview page
I'd like to show how many available spots remain (or how many spots have been reserved) for a Booking System event on the overview (calendar) page. That way if an event is full the site visitor doesn't have to click through to see if space is available.

Any thoughts or examples on how to accomplish this? We are currently using v5.5.4097 R2. Thanks!

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 12/20/2011 2:39:45 AM
   
RE:Showing event capacity on calendar / overview page
Hello,

The most straightforward way would be to get the total capacity of the event (EventCapacity column) and subtract the total number of registered attendees (Events_Attendee table). I would recommend you to check the following objects in our API reference:

CMS.EventManager.EventAttendeeInfoProvider
CMS.EventManager.EventProvider

You can place your code into a custom transformation method as described here.

Best regards,
Boris Pocatko