[TYPO3-dev] alwaysActivePIDlist

Christian Trabold trabold at mehrwert.de
Mon Oct 23 14:36:27 CEST 2006


Hi Steffen,
Hi Joey,

>>> the property alwaysActivePIDlist is new since Version 4
>>> Now when i set
>>>
>>> alwaysActivePIDlist = 4,7
>>>
>>> it works fine.
>>>
>>> Next step was trying to set it dynamically, but it doesn't work
>>>
>>> alwaysActivePIDlist < tmp.pids
>>> or
>>> alwaysActivePIDlist.(stdWrap.)dataWrap =
>>> {register:ttnewsCat1},{register:ttnewsCat2}
>>>
>>> failed.
>>>
>>> How is the right way to set this property dynamic ?
>> Read TSref:
>> alwaysActivePIDlist -> list of integers
>>
>> Since there is nothing like "list of integers / stdWrap" this means you
>> can't set it dynamically.
>>
>> A workaround could be using conditions.
>> I.e. for different values based on the current rootline of the page
>>
>> [PIDinRootline = 1]
>> temp.whatever.alwaysActivePIDlist = 1,2,3,4
>> [global]
...
> hmm - conditions for that case is not a possible way. So may i make a 
> featurequest for that in bugtracker ?

have a look at HMENU-property "itemArrayProcFunc" - thus you could set 
up your stdWrap functionality easily.

Here's a quick example / sketch which demonstrates this approach:


*Example TypoScript-Setup*
includeLibs.menufunc = your_php_script.php


   10 = HMENU
   10 {
     1 = GMENU
     1 {
       itemArrayProcFunc = user_your_class->user_your_method
       itemArrayProcFunc.value.stdWrap.data = leveluid : 1
...



*Example PHP-Script*
class user_your_class {
   function user_your_method($menuArr, $conf) {
     $page_id = 
$this->cObj->stdWrap($conf['value.']['stdWrap.']['data'], 
$conf['value.']['stdWrap.']);

     if($page_id == 1) {
       $menuArr[$k]['ITEM_STATE'] = 'ACT';
     }
     return $menuArr;
   }
}


Greetings,

Christian




More information about the TYPO3-dev mailing list