[TYPO3-calendar] Need eventLink as eventUrl in list view

Mario Matzulla mario at matzullas.de
Fri Jan 27 17:44:41 CET 2012


Hi Stig,

Am 27.01.12 11:44, schrieb Stig Nørgaard Færch:
>>> I have been trying to make a custom-marker, which should just be the
>>> same url as in the eventLink (going it use it for an onclick).
>>> eventLink is based on plugin.tx_cal_controller.view.defaultLinkSetup
>>>
>>> I tried to copy this to my test marker test123:
>>>
>>> plugin.tx_cal_controller.view.list.event {
>>> test123 < plugin.tx_cal_controller.view.defaultLinkSetup
>>> test123.typolink.returnLast = url
>>> }
>>>
>>> But the marker is just empty.
>>>
>>> Any other ways to get the url of the event?
>>
>> please try ###EVENT_URL###
>
> Tried it, but it returns empty.
>
> When looking in the code, EVENT_URL only seems to be handled here.
> Seems it should only be availbe when $this->conf['view.']['enableAjax']
> is set.
> Also - I don't get it. In getEventUrlMarker() only $sims seems to be
> written to.
> But in getAdditionalValuesAsArray() it reads the $wrapped array. What am
> I not seeing?
>
> function getEventUrlMarker(& $template, & $sims, & $rems, & $wrapped,
> $view) {
> $eventStart = $this->getStart();
> $sims['###EVENT_URL###'] =
> htmlspecialchars($this->getLinkToEvent('|',$view,
> $eventStart->format('%Y%m%d'),true));
> }

This is the right function and cal will call it, when you use the single 
marker ###EVENT_URL### - not as wrap ;)
>
>
> function getAdditionalValuesAsArray() {
> $values = parent::getAdditionalValuesAsArray();
> $values['event_owner'] = $this->getEventOwner();
> $values['cruser_id'] = $this->getCreateUserId();
> if($this->conf['view.']['enableAjax']){
> $template = '';
> $sims = Array();
> $rems = Array();
> $wrapped = Array();
> $this->getEventUrlMarker($template, $sims, $rems, $wrapped, 'event');
> $values['event_link'] = $wrapped['###EVENT_URL###'];
> }
> return $values;
> }

Those values are additinally available in the TS.

Regards,
Mario


More information about the TYPO3-project-calendar mailing list