[TYPO3-calendar] plugin.tx_cal_controller.view.category.tree.category / calendar

Mario Matzulla mario at matzullas.de
Sat Jan 12 11:20:49 CET 2013


Hi Patrick,

Am 11.01.13 11:37, schrieb PM:
> Am 10.01.2013 18:11, schrieb Mario Matzulla:
>> Hi Patrick,
>>
>> Am 10.01.13 11:32, schrieb PM:
>>> Intention:
>>> - I have for example 3 calendars. One contains for example only holidays
>>> and this calendar should always be shown. The front-end user should only
>>> be able to select or unselect the categories from the other 2 calendars.
>>> - The same could be true for categories.
>>> - Also one could imagine to have more categories than "different
>>> colors". So one does for example only want that the main 5 categories
>>> appear in the legend-tree.
>>>
>>> So my intention is not really about the FE-user selection. Its about the
>>> categories that are shown in the legend.
>>>
>>>
>>> Therefore I was looking for a way to restrict the categories/calendars
>>> that are visible in the legend.
>>>
>>> And I found the two options:
>>>
>>> plugin.tx_cal_controller.view.category.tree.category
>>> plugin.tx_cal_controller.view.category.tree.calendar
>>>
>>> with the description
>>> "# @description Defines the categories shown in the tree (csv of ids)" .
>>
>> you are right, this option is not configurable. It is more a description
>> of the structure the tree function needs.
>>
>> So in order for you to get what you want, I would say: you need a custom
>> marker calling our tree function with your definition of categories and
>> calendars...
>>
>> A "module__" marker should be very easy. Have a look at our "misc"
>> folder there are some examples. And here is a short description [1].
>>
>> Regards,
>> Mario
>>
>> [1]
>> http://www.wischnat.de/1606.0.html?&cHash=012b2f7315&tx_ttnews[backPid]=1571&tx_ttnews[tt_news]=121
>>
>
> So what I have to do is:
>
> 1. Write the php-function (like the example in the misc folder):
> class.module_SpecialLegend.php
> This function calls the existing tree-function with the correct parameters.
> It returns the html-code of the tree as I want it to be.
>
> 2. I add
> t3lib_extMgm::addService($_EXTKEY,  'TEST' /* sv type */,

The 'TEST' and what's after MODULE__XXX has to be the same!

> 'tx_cal_module' /* sv key */,
>      array(
>          'title' => 'Test module', 'description' => '', 'subtype' =>
> 'module',
>          'available' => TRUE, 'priority' => 50, 'quality' => 50,
>          'os' => '', 'exec' => '',
>          'classFile' =>
> t3lib_extMgm::extPath($_EXTKEY).'misc/class.module_SpecialLegend.php',
>          'className' => 'module_SpecialLegend',
>      )
> );
> to
> ext_localconf.php
>
> 3.)
> I add the marker ###MODULE__SpecialLegend### in the template at the
> correct position.

So if you call your marker ###MODULE__SPECIALLEGEND###, you have to 
define the service:
t3lib_extMgm::addService($_EXTKEY,  'SPECIALLEGEND' /* sv type */,

Regards,
Mario
>
>
> Are these the correct steps to take or did I forget something?
>
>
>
>



More information about the TYPO3-project-calendar mailing list