Hi iRolf,
I love the iCalendar snippet - works great!
I have one problem though, the calendar relies on the pub_date and unpub_date of the document. Is there any way to respecify this to TVs? So I can have a calendar generated from documents that are already published on the site and use date type TVs to specify the start and end dates?
I don’t know much PHP and while I feel I have a grasp of your code, I tried using a date type TV called "general_date" and changing the line:
$childArr = $modx->getAllChildren($parent ,$sortBy, $sortDirection ,'pub_date,unpub_date,id,pagetitle,parent,deleted');
to
$childArr = $modx->getAllChildren($parent ,$sortBy, $sortDirection ,'pub_date,unpub_date,id,pagetitle,general_date,parent,deleted');
and it threw up an error obviously to my basic understanding.
Any idea how I could specify start and finish dates with tv’s?