[TYPO3-calendar] Show in Legend only categories used this month

PM patrickm87 at gmx.de
Tue Jan 15 14:52:44 CET 2013


Am 15.01.2013 11:22, schrieb PM:
> Am 14.01.2013 20:05, schrieb Mario Matzulla:
>> Hi Patrick,
>>
>> Am 14.01.13 07:37, schrieb PM:
>>> Am 12.01.2013 11:17, schrieb Mario Matzulla:
>>>> Hi Patrick,
>>>>
>>>> Am 11.01.13 11:30, schrieb PM:
>>>>> Hi Mario
>>>>>
>>>>> Am 10.01.2013 18:14, schrieb Mario Matzulla:
>>>>>> Hi Patrick,
>>>>>>>
>>>>>> I see what you intend to do. And I think the module__marker
>>>>>> described in
>>>>>> the other thread is what you are looking for: a custom way to
>>>>>> configure
>>>>>> the category and calendar legend :)
>>>>>
>>>>> Is there also a function that returns all the categories of events of
>>>>> the current month (or of any other defined period of time) ?
>>>>
>>>> Nope, else it would be easy ;)
>>>> I guess you have to walk through all events of the master_array and get
>>>> their categories.
>>>>
>>>> Regards,
>>>> Mario
>>>>
>>>> BTW: if you place the module__marker inside the day,week or month
>>>> template you should get the corresponding view object, which extends
>>>> the
>>>> base_view, which has all you need: $this->master_array and the
>>>> getCategorySelectionTree function.
>>>>
>>>>>
>>>>>>
>>>>>> Regards,
>>>>>> Mario
>>>
>>> Okay found the events in the master_array. But I only need the events of
>>> the month thats currently selected.
>>> So to choose these events I have to know which month the user currently
>>> has selected.
>>> But I didn't find the selected month in the master_array.
>>> Can you tell me how I can get it?
>>
>> It's in the configuration array of the base_service: $conf['getdate'] =>
>> a string value like YYYYMMDD.
>
> Thanks for that, works fine for the month view.
>
> If I want to use my module in the month template and in the year view
> template, how can I find out which template/view is calling my module?
>

I found out was wrong when I told everything works fine.

There is another problem:
The Arrays:

$moduleCaller->master_array
and also $moduleCaller->event_array

consist only of events of categories that are selected.

How can I get a list of the events of categories that are deselected.

Example:
Event1 -> Cat1
Event2 -> Cat1
Event3 -> Cat3

If I have only the Categorie Cat1 selected, then there are Event1 and 
Event2 in $moduleCaller->master_array.

But I also need Event3. Where can I find it?



More information about the TYPO3-project-calendar mailing list