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

Stig Nørgaard Færch snf at dkm.dk
Mon Jan 30 09:08:51 CET 2012


Den 27-01-2012 17:44, Mario Matzulla skrev:
> 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 ;)

I did use as a single marker - of course not as a wrap :-)
But nevertheless, it returns empty

Have you tested if it works on your installation?

>> 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.

you mean event_owner, cruser_id and event_link?

/Stig



More information about the TYPO3-project-calendar mailing list