[Typo3-dev] Option split works problematic

tapio tapio.markula at dnainternet.net
Wed Jun 1 15:51:04 CEST 2005


Option split value should be COMMON for ALL menu items in the same 
level. If the item state is CUR or ACT, the option split is useless,
Because there is just ONE item/ menu

IF the option calculation could base on ALL items item in the
Same menu level the option split could be used also for CUR and ACT,
When for examle

FIRTST ITEM | some item | another item | LAST ITEM 
Would work even if the LAST item would be in the state CUR.

Because option split is useless for ACT and CUR, in menu, which use
Separators BETWEEN items but not for the last item, it is not possible
To use CUR and ACT in certain menues.

In fact I should write USERDEF1 for CUR, which is last in the menu.

it should be something like

  function curlast($menuArr,$conf)    {
         // Enable the USERDEF1 menustate as a replacement for the 
missing CURIFSUB menustate.
         // Usage: In your TMENU/GMENU object insert this line:
         //        itemArrayProcFunc = user_itemArrayProcFunc->curifsub
         while(list($k,$v)=each($menuArr))    {
             if ([here some condition] && 
$conf["parentObj"]->isItemState("CUR",$k)) 
$menuArr[$k]["ITEM_STATE"]="USERDEF1";
         }
         return $menuArr;

There should be an extra condition to [here some condition] in order to 
detect in the number of the item.
Any ideas how to do that.




More information about the TYPO3-dev mailing list