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

Stig Nørgaard Færch snf at dkm.dk
Fri Jan 27 11:44:21 CET 2012


>> 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));
}


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;
}


More information about the TYPO3-project-calendar mailing list