Using ICS to create a Calendar Download
In this guide we will review how to create a button to download a calendar event connected to an event.
You can view an example of this working of this functionality at the Zesty Burger Demo.
Create the endpoint
Create an endpoint with any relevant name and a .ics
extension. In this example we used event.ics
.
Write the ICS file
Below is an example ICS syntax wrapped with a parsley each loop, and replacing dynamic pieces of content with parsley calls to relevant fields:
Note that the query in the each loop is looking for a query parameter names id
to get the correct event.
Add the Markup
Here is the HTML and parsley we are using on the event page to generate the button where we are referencing the end point we created and adding in the event id as a query parameter.
Connect with Content Experts
Book a free 15-minute consultation with a content expert. Discuss your application, pain points and requirements. Understand how Zesty's lower total cost of ownership, features, functionality can elevate your business by creating extraordinary digital experiences.
Trusted By
G2 MOMENTUM LEADER