[TYPO3-german] Calendar in Template
Widmann, Manfred
mpunktw at gmx.net
Thu Jan 24 19:16:50 CET 2008
"Rolf Kutz" <rk at vzsze.de> schrieb im Newsbeitrag
news:mailman.5157.1201103393.5304.typo3-german at lists.netfielders.de...
> Hallo,
>
> ich habe eine Seite mit zwei und drei Spalten
> Layout. In der dritten Spalte würde ich gerne
> eine Listenansicht von Events aus einem Kalender
> (cal) anzeigen. Am liebsten wäre mir diese über
> einen Marker im Template auszugeben. Wie gehe ich
> dabei am besten vor? Gibt es bessere
> Möglichkeiten?
>
> Viele Grüße, Rolf
Ich mach's so:
HTML-Template:
...
<!-- Calendar Teaser -->
<div id="calendarTeaser">
<div class="tx-cal-controller">
<div class="calAlarm">Keine Termine in der nächsten Woche</div>
</div>
</div> <!-- calendarTeaser -->
...
TS-Template.Setup:
#######
# cal #
#######
########### Settings
plugin.tx_cal_controller {
# Templates
view {
month {
monthTemplate = fileadmin/template/cal/month.tmpl
monthSmallTemplate = fileadmin/template/cal/month_small.tmpl
monthMediumTemplate = fileadmin/template/cal/month_medium.tmpl
monthLargeTemplate = fileadmin/template/cal/month_large.tmpl
calendarNavTemplate = fileadmin/template/cal/calendar_nav.tmpl
}
event {
eventTemplate = fileadmin/template/cal/event.tmpl
phpicalendarEventTemplate =
fileadmin/template/cal/phpicalendar_event.tmpl
#startdate_stdWrap >
#startdate_stdWrap.substring = 48,21
}
list {
listTemplate = fileadmin/template/cal/list.tmpl
eventDateFormat = %e.%m.%Y
eventTimeFormat = %H:%M
}
day.dayTemplate = fileadmin/template/cal/day.tmpl
location.locationTemplate = fileadmin/template/cal/location.tmpl
organizer.organizerTemplate = fileadmin/template/cal/organizer.tmpl
}
# Configs
view.event {
startdate_stdWrap.dataWrap = |
starttime_stdWrap.dataWrap = |
enddate_stdWrap.dataWrap = |
endtime_stdWrap.dataWrap = |
title_stdWrap.dataWrap = |
organizer_stdWrap.dataWrap = |
location_stdWrap.dataWrap = |
description_stdWrap.dataWrap = |
attachment_stdWrap.dataWrap = |
}
}
# CSS
plugin.tx_cal_controller._CSS_DEFAULT_STYLE >
page.includeCSS.cal = fileadmin/template/cal/cal_style.css
########### CalendarTeaser cObject
temp.alarm = COA_INT
temp.alarm.10 < plugin.tx_cal_controller
temp.alarm.10 {
#allowSubscribe = 0
pages = 188
view {
allowedViews = list
#defaultView = list
eventLinkTarget = day
weekStartDay = Monday
#calendar.defaultUid = 188
event.eventViewPid = 189
day.dayViewPid = 189
list {
listTemplate = fileadmin/template/cal/alarm.tmpl
listViewPid = 189
starttime = -1 day
endtime = +1 week
maxEvents = 7
eventDateFormat = %e.%m.
eventTimeFormat = %H:%M
title_stdWrap.wrap >
#title_stdWrap.override = <img class="calAlarmEventIcon"
src="fileadmin/template/cal/###HEADERSTYLE###.jpg" />
title_stdWrap.crop = 35|...
noEventFound_stdWrap.wrap = <!--|-->
#noEventFound_stdWrap >
#noEventFound_stdWrap.override = Keine Termine in der nächsten Woche
}
}
}
and somewhere later:
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
# Feeding the content from the Auto-parser to the TEMPLATE cObject:
template =< plugin.tx_automaketemplate_pi1
...
# Substitute the ###calendarTeaser### subpart with dynamic content:
subparts.calendarTeaser < temp.calendarTeaser
...
}
More information about the TYPO3-german
mailing list