[TYPO3-commerce] second child menu for categories
Robert Grede
gredini at googlemail.com
Fri Oct 10 09:02:42 CEST 2008
Alexander schrieb:
> Paul Hansen пишет:
>> Alexander wrote:
>>> Hello list
>>> I need to get your advices. Need to realize on my site 2 menus. First
>>> one - menu of categories, second one - menu of sub categories of
>>> parent category. As I know, in case with a normal menus I can use
>>> "entryLevel", can I use it to build commerce navigation?
>>
>> You would build your category tree appropriately, then use the
>> "special" HMENU property to select the starting point:
>>
>> 10 = HMENU
>> 10.special.category = 2
>> 10.1 = TMENU
>>
>> ...etc...where 2 is the ID of the category. The constant for this is
>> {$plugin.tx_commerce_lib.catUid}, the default category.
>>
>> This means that if you want a menu that shows all your categories,
>> you'll need to create one parent and put all your subcategories under
>> this.
>>
>> Take care,
>> Paul
>
>
> Thanks for reply, but I meant another thing. I know how to build a
> commerce menu. I need two menus on on page. Not for different parent
> categories.
> I need this:
>
> Main categories menu
>
> Category 1 (NO state)
> Category 2 (NO state)
> Category 3 (NO state)
> Category 4 (NO state)
> Category 5 (NO state)
>
> When I click to one of categories a second menu must appear
>
> Category 1 (NO state) Category 2 submenu 1
> Category 2 (ACT state) Category 2 submenu 1
> Category 3 (NO state) Category 2 submenu 1
> Category 4 (NO state) Category 2 submenu 1
> Category 5 (NO state)
>
>
> So, this is like a build menus using entryLevel parameter. But I don't
> know how to get it works.
>
> Alex.
Hi,
I have the same problem. Therefore, I try to assign the catUid from the
URL with:
shopcat = TEXT
shopcat.data = GPvar:tx_commerce_pi1|catUid
lib.shopnav = HMENU
lib.shopnav {
special = userfunction
special{
userFunc = user_tx_commerce_catmenu_pub->init
# Kategorie fuer Startebene
category < shopcat
# zeige Producte
showProducts = 0
# PID fuer die Anzeige der Seite
overridePid = {$plugin.tx_commerce_lib.overridePid}
}
But anything goes wrong, because this runs in a 'No category defined in
TypoScript: lib.tx_commerce.navigation.special.category'.
What is the problem and how can I fix it?
regards,
Robert
More information about the TYPO3-project-commerce
mailing list