Generate icalendar with a template