Jetzt bin ich ein bisschen schlauer geworden! Erstens eine Erklärung von Mario Matzulla:
if cal recognizes a marker ###MODULE__XX### it searches for a module service with name XX. If there is such a service, cal hands over an instance of the current model or view depending where the marker is found (if you are in the event.tmpl, this would be the event view; inside the event_model.tmpl, this would be the event itself) by calling the start() function.
Please have a look at the misc folder, where you can find our examples for location- and organizerloader services.
Remember, that you have the proper TS configuration for the location fields inside the event view:
view.{view}.{object}.{field}
Example:
view.event.location.street =
The easiest way would be:
plugin.tx_cal_controller.view.event.location < plugin.tx_cal_controller.view.location.location
As for the templates, they got a little bit mixed up. But as you can see inside the locationloader class: check the TS for module.locationloader.template =
und zweitens meine Umsetzung:
habe im event_model.tmpl den Marker ###LOCATION### durch ###MODULE__LOCATIONLOADER### ersetzt:
<h1>###TITLE###</h1>
###IMAGE###
###CATEGORY###
###STARTDATE###
###ENDDATE###
###STARTTIME###
###ENDTIME###
###ORGANIZER###
###MODULE__LOCATIONLOADER###
###DESCRIPTION###
und das Typoscript angepasst:
plugin.tx_cal_controller.view.location.location {
# @description Content object for location name
name = TEXT
name {
current = 1
required = 1
dataWrap = <span><b>Ort:</b> |</span><br />
}
# @description Content object for location street
street = TEXT
street {
current = 1
required = 1
dataWrap = <span> |</span><br />
}
# @description Content object for location city
city = TEXT
city {
current = 1
required = 1
dataWrap = <span> |</span><br />
}
# @description Content object for location zip
zip = TEXT
zip {
current = 1
required = 1
dataWrap = <span> |</span>
}
# @description Content object for location phone number
phone = TEXT
phone {
current = 1
required = 1
dataWrap = <div>Tel: |</div><br />
}
# @description Content object for location facsimile number
fax = TEXT
fax {
current = 1
required = 1
dataWrap = <div>Fax: |</div><br />
}
# @description Content object for location description
description =< tt_content.text.20
description {
field = description
required = 1
dataWrap = <div class="locdesc"> |</div>
}
# @description Content object for location email
email = TEXT
email {
current = 1
typolink.parameter.current = 1
required = 1
dataWrap = <div>Email: |</div><br />
}
# @description Content object for location link
link < .email
link {
dataWrap = <div>Link: |</div><br />
}
# @description Content object for location image
image =< plugin.tx_cal_controller.view.event.event.image
}
plugin.tx_cal_controller.view.event.location < plugin.tx_cal_controller.view.location.location
und noch das Template vom standard_template kopiert und in den Konstanten angesprochen:
plugin.tx_cal_controller.module.locationloader.template = fileadmin/admin/ext/cal/module_locationloader.tmpl
Das war's!
Hoffe, das hilft vielleicht auch anderen!