How to use a date tv for the DittoCal:
I found that the date is a real issue if you are using a custom tv date for your ditto posts.
I did have to us phx for my regular Ditto calls on the page.
Install DittoCal per instructions.
Part 1:
Setup TV [*eventDate*]
Input Type: Date
Widget: Unixtime
Part 2: my ditto page that is setup for webpage viewing.
[[Ditto? &parents=`24` &tpl=`eventsTpl` &orderBy=`eventDate ASC`]]
the ditto &tpl for regular page views.
<div class="event">
<h3>[+longtitle+]</h3>
[+eventDate:date=`%a, %b %d %Y`+]<br /> //phx on date preview
[+eventLocation+]<br />
[+eventPrice+]<br />
[+startTime+] - [+endTime+]<br />
<a href="[+eventLink+]" title=" Buy Ticket for [+longtitle+]" target="_blank"><img src="[(base_url)]assets/templates/ptc/img/buyTicket.png" width="100" height="24" alt="Buy Ticket" /></a><br />
<a href="[~[+id+]~]" title="[+longtitle+]">More about this event</a>
</div>
Part 3: Create your doc id for Calendar setup.
make sure the page is using the blank template
Use the following as the Resource Content (notice the ditto call to a tpl (that’s the override of the date).
{
"title":"[*pagetitle*]",
"link":"[(site_url)][~[*id*]~]",
"description":"[*description*]",
"language":"en",
"copyright":"[(site_name)]",
"ttl":"120",
"entries":[
[!Ditto? &parents=`24` &summarize=`100` &orderBy=`eventDate ASC` &tpl=`eventsCalTpl`!]
]
}
now create a chunk tpl to override the date. {{eventsCalTpl}}
{
"title":"[+longtitle+]", // use what ever you want eg: pagetitle longtitle tv - all stuff is pretty much override at this point
"link":"[(site_url)][~[+id+]~]",
"date":"[+eventDate+]",
"guid":"[(site_url)][~[+id+]~]",
"author":"[+author+]",
"description":"[+description+]",
"introtext":"[+introtext+]",
},
then post that ditto call bad boy and ready to roll.
<div class="eventCal">[!DittoCal? &calSource=`252(the *id*)` &firstDay=`1` &dayNameLength=`2` &dateSelection=`now` &futureDate=`1`!]</div>