Played around with #
cal and some #
html5 and #
microformats today. By default cal seems to have basic support for #
hCalendar. I tried to extend it a bit and also add
http://schema.org/Event declarations.
I don't know what this will be actually good for or if it is useful at all. Right now just playing bit around. Still quite buggy, not finished yet and also much space for optimisations still.
How do you add semantic to your events?
Heres some #
TypoScript:
# configure single event view
plugin.tx_cal_controller.view.event.event {
 # Event title is displayed as page title and outside of the event declaration, so add it as meta-tag
 title.dataWrap = <meta itemprop="name" content="|">
 # declare image itemprop
 image.stdWrap.dataWrap = |
 image.1.params = itemprop="image"
 # this declaration is done in template because always visible
 startdate.dataWrap = |
 # wrap in HTML5 time-tag
 enddate {
   dataWrap = |</time>
   prepend = TEXT
   prepend.dataWrap = <time datetime="|" itemprop="endDate" class="dtend">
   prepend.field = end
   prepend.strftime = %Y%m%dT%H%M00
 }
 # TODO this should be visible if enddate is not visible
 microformat_enddate = TEXT
 microformat_enddate {
   field = end
   strftime = %Y%m%dT%H%M00
   dataWrap = <meta itemprop="endDate" content="|">
 }
 starttime.dataWrap = |
 endtime.dataWrap = -| Uhr
 # The location of the event, could be much more extended by tt_address data like geo coordinates, etc.
 location.dataWrap = <div class="cal_loc" itemprop="location" itemscope itemtype="http://schema.org/Place">%%%LOCATION%%%: <span itemprop="name" class="location">|</span></div>
 # only hCalendar
 category_link.dataWrap = <div class="cal_cat">%%%CATEGORY%%%: <span class="category">|</span></div>
 # should be class 'description', but need to assign 'summary' to the title because summary is required by hCalendar
 description.dataWrap = <div class="summary">|</div>
 # MICROFORMAT_START does exist, also add MICROFORMAT_END
 microformat_end = TEXT
 microformat_end {
   field = end
   strftime = %Y%m%dT%H%M00
 }
}
In the event_model.tmpl I add a little bit:
<!--#
##TEMPLATE PHPICALENDAR EVENT### begin -->
<!--phpicalendar_event.tmpl-->
<div class="vevent" itemscope itemtype="http://schema.org/Event">
#
##TITLE####
##IMAGE####
##CATEGORY LINK####
##MICROFORMAT ENDDATE###<time datetime="#
##MICROFORMAT START###" itemprop="startDate" class="dtstart">#
##STARTDATE###</time>#
##ENDDATE######STARTTIME######ENDTIME####
##LOCATION####
##DESCRIPTION###</div>
<!--/phpicalendar_event.tmpl-->
<!--#
##TEMPLATE PHPICALENDAR EVENT### end -->