[TYPO3-commerce] problem with active state in menu

Rik Willems rik at actiview.nl
Thu Sep 3 09:41:31 CEST 2009


I also had a look at it then. It is a little bit complicated so I didn't 
manage to create a solution. When I have time I'll look into it.

Rik

Bob Wild schreef:
> Thanks again, Rik, for your contribution. I surfed around the bug 
> tracker at forge today and I saw you already posted the problem.
> 
> So maybe there will be a solution sometimes soon.
> 
> All the best!
> Robert
> 
>> Hi Robert,
>>
>> Something is not totally correct in the navigation class. You can see 
>> that in the bugtracker as well. Perhaps this also creates your 
>> problem. I noticed that the active and current states are not properly 
>> assigned. There is no solution that that yet as far as I know. You 
>> could try the svn version for the latest updates.
>>
>> Greets, Rik
>>
>> Robert Wildling schreef:
>>> Hi,
>>>
>>> I posted this problem a couple days ago, but there was no answer yet 
>>> - I hope there is anybody, who can help me - I am pretty desperate 
>>> already! Thanks in advance!
>>>
>>> I use the meanwhile famous setup for the shop menu:
>>>
>>> lib.SHOPMENU = HMENU
>>> lib.SHOPMENU {
>>>     special = userfunction
>>>     special.userFunc = user_tx_commerce_catmenu_pub->init
>>>         special {
>>>             // Kategorie fuer Startebene
>>>             category = {$plugin.tx_commerce_lib.catUid}
>>>                        // zeige Produkte (das waere dann sowas wie 
>>> weitere Untermenues
>>>             // ist das empfehlenswert bei der EXT Voreinstellung "Nur 
>>> 1 Produkt/Kat"? -> Testen
>>>             // gestestet: Die Voreinstellung beeinflusst offenbar nur 
>>> das BE...
>>>             showProducts = 0
>>>                        // PID fuer die Anzeige der Seite
>>>             overridePid = {$plugin.tx_commerce_lib.overridePid}
>>>                        expandAll = 1
>>>             entryLevel = 0
>>>                        #additionalFields = teaser, teaserimages
>>>             useRootlineInformationToUrl = 
>>> {$plugin.tx_commerce_lib.useRootlineInformationToUrl}
>>>     }
>>>
>>>         // Menuebenen
>>>     1 = TMENU
>>>     1 {
>>>             itemArrayProcFunc = user_tx_commerce_catmenu_pub->clear
>>>             wrap = <ul>|</ul>
>>>             noBlur = 1
>>>                        NO = 1
>>>             NO {
>>>                 stdWrap.case = upper
>>>                 wrapItemAndSub = <li class="shop_menu_normal"><img 
>>> src="fileadmin/assets/shop_list_inactive.jpg" width="20" height="14" 
>>> border="0" />|</li> |*| <li class="shop_menu_normal"><img 
>>> src="fileadmin/assets/shop_list_inactive.jpg" width="20" height="14" 
>>> border="0" />|</li> |*| <li class="shop_menu_normal 
>>> padding_bottom_10"><img src="fileadmin/assets/shop_list_inactive.jpg" 
>>> width="20" height="14" border="0" />|</li>
>>>             }
>>>                        ACT = 1
>>>             ACT < .NO
>>>             ACT {
>>>                 wrapItemAndSub = <li class="shop_menu_active"><img 
>>> src="fileadmin/assets/shop_list_active.jpg" width="20" height="14" 
>>> border="0" />|</li> |*| <li class="shop_menu_active"><img 
>>> src="fileadmin/assets/shop_list_active.jpg" width="20" height="14" 
>>> border="0" />|</li> |*| <li class="shop_menu_active 
>>> padding_bottom_10"><img src="fileadmin/assets/shop_list_active.jpg" 
>>> width="20" height="14" border="0" />|</li>
>>>                 doNotLinkIt = 0
>>>             }
>>>                        ACTIFSUB = 1
>>>             ACTIFSUB < .ACT
>>>                        CUR = 1
>>>             CUR < .ACT
>>>                        CURIFSUB = 1
>>>             CURIFSUB < .ACT
>>>     }
>>>         # weitere Ebenen
>>>     # ---- Alle folgenden sind identisch mit dieser
>>>     2 < .1
>>>     3 < .2
>>>            1.itemArrayProcFunc = user_tx_commerce_catmenu_pub->clear
>>>     2.itemArrayProcFunc = user_tx_commerce_catmenu_pub->clear
>>>     3.itemArrayProcFunc = user_tx_commerce_catmenu_pub->clear
>>>
>>> }
>>>
>>>
>>> page.20.subpart.MENU_MAIN < lib.SHOPMENU
>>>
>>>
>>> The page tree has the following structure:
>>>
>>> GlumpArt (root)
>>> - Shop (pid = 1)
>>> --- Produktliste (pid = 10)
>>> --- Warenkorb (pid = 9, invisible)
>>> etc
>>>
>>> (It can be seen here: shop.krahphix.at)
>>>
>>>
>>> The categories look like this:
>>>
>>> kategorien (root)
>>> - Unser Angebot (id = 2)
>>> --- Schmuck (id = 3)
>>> ----- Ketten
>>> ----- Ringe
>>> --- Huete
>>> --- Bilder
>>> etc
>>>
>>> The catUID = 2.
>>>
>>>
>>> What happens is that there is no active status shown, when a category 
>>> that itself has subcategories (and therefore no products) is active. 
>>> As soon as one of its subcategories is clicked, the active status is 
>>> shown in both, the parent and child category. BTW: It doesn't make 
>>> any difference whether there is a product in the parent category or not.
>>>
>>> When I click on a category without submenues, the active status is 
>>> shown.
>>>
>>> Another strange behaviour:
>>> When I have a view, where there is shown the parent category and its 
>>> subcategories, and I click in this view on one of the subcategories 
>>> (that is I do NOT click a subcategory in the menu!), the active 
>>> status is only shown for the parent category. This is also true as 
>>> soon as i click on one of the products (-> Product view) - then only 
>>> the parent category is active; if it is a category without 
>>> subcategories, then the active status gets lost, too.
>>>
>>> Can anybody gibe me a hint where my mistake is, please?
>>>
>>> Thanks!
>>> Regards,
>>> Robert


More information about the TYPO3-project-commerce mailing list