Hi everyone, i'm french and i don't speak german at all (and my english is not so good either) but i heard germans have the best typo3 community ever so here i am asking for your help, i hope you don't mind ^^.
I have a tiny issue with the project i'm working on :
i have a main menu on top of my page and a submenu in a left bar witch changes depending on the main menu link i click.
what i would like to do is add a submenu title to my submenu and i would like it to change and take the name of its parent link
ex :
main menu : home gallery contact
submenu title : gallery
submenu links : item1, item2, item3
And i'would like my "gallery" to stay in active state when i navigate on the submenu links.
i don't know if i'm clear but if you need additionnal details i'll try to explain in it more.
here is my typoscript :
## MENU BEGIN
MAIN-MENU= HMENU
MAIN-MENU{
special=list
special.value=1,2,5,6,7,8
1 = TMENU
1 {
noBlur = 1
expAll = 0
wrap = <ul>|</ul>
NO.wrapItemAndSub = <li>|</li>
NO.ATagTitle.field = abstract // description // subtitle // title
ACT = 1
ACT.wrapItemAndSub = <li>|</li>
ACT.ATagTitle.field = abstract // description //subtitle // title
CUR = 1
CUR.allWrap = <li class="current">|</li> | |
CUR.doNotLinkIt = 1
}
}
## MENU END
##SubMENU BEGIN
SUB_MENU = COA
SUB_MENU.2 = HMENU
SUB_MENU.2 {
special = directory
#special.value = 8
special.value.data = leveluid:1
entryLevel = 1
expAll = 1
1 = TMENU
1 {
noBlur = 1
expAll = 0
wrap = <ul>|</ul>
NO.wrapItemAndSub = <li>|</li>
NO.ATagTitle.field = abstract // description // subtitle // title
ACT = 1
ACT.wrapItemAndSub = <li>|</li>
ACT.ATagTitle.field = abstract // description //subtitle // title
CUR = 1
CUR.allWrap = <li class="current">|</li> | |
CUR.doNotLinkIt = 1
}
}
##SubMENU END
thanks everyone and i hope you can help me ^^
Hallo Matthieu,
maybe I can help you.
1. And i'would like my "gallery" to stay in active state when i navigate on the submenu links.
You have to write something like this in your TS
ACTIFSUB
https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/ContentObjects/Hmenu/Tmenu/Index.html#confval-menu-tmenu-item-states
2. For the title you may choose this TS
temp.MenuLinks = COA
temp.MenuLinks{
10 = TEXT
10.value = text
10.data = leveltitle:1
10.wrap = <div class="menue_title">|</div>
20 = HMENU
20{ YOUR TS FOR THE SUBNAV}
hi,
thanks a lot, your ts works like a charm :]
But i still have some trouble to set an active state on my "gallery" when i navigate in the submenu items.
The active state is on when i navigate only on the main menu items but when i click on the sub links the active state turns off
any ideas?
thanks again for the other issue i had ^^
You should post your new TS so we can help you find the mistake.
hi there,
here is my ts of the menu
## MENU BEGIN
MAIN-MENU= HMENU
MAIN-MENU{
special=list
special.value=1,2,5,6,7,8
1 = TMENU
1 {
noBlur = 1
expAll = 0
wrap = <ul>|</ul>
NO.wrapItemAndSub = <li>|</li>
NO.ATagTitle.field = abstract // description // subtitle // title
ACT = 1
ACT.wrapItemAndSub = <li>|</li>
ACT.ATagTitle.field = abstract // description //subtitle // title
CUR = 1
CUR.allWrap = <li class="current">|</li> | |
CUR.doNotLinkIt = 1
}
}
## MENU END
##SubMENU BEGIN
SUB_MENU = COA
SUB_MENU.1 = TEXT
SUB_MENU.1.value = text
SUB_MENU.1.data = leveltitle:1
SUB_MENU.1.wrap = <div class="menue_title">|</div>
SUB_MENU.2 = HMENU
SUB_MENU.2 {
special = directory
#special.value = 8
special.value.data = leveluid:1
entryLevel = 1
expAll = 1
1 = TMENU
1 {
noBlur = 1
expAll = 0
wrap = <ul>|</ul>
NO.wrapItemAndSub = <li>|</li>
NO.ATagTitle.field = abstract // description // subtitle // title
ACT = 1
ACT.wrapItemAndSub = <li>|</li>
ACT.ATagTitle.field = abstract // description //subtitle // title
CUR = 1
CUR.allWrap = <li class="current">|</li> | |
CUR.doNotLinkIt = 1
}
}
##SubMENU END
i tried to replace ACT by ACTIFSUB in both lvl of the menu but it doesn't work. i'm new in typoscript so i don't know what to do exactly, i just (pretty much) understand some basics like the CUR element or ACT, but my knowledge is pretty thin so i apologize for the newbies questions 🙂
Maybe this could work...
## MENU BEGIN
MAIN-MENU= HMENU
MAIN-MENU{
special=list
special.value=1,2,5,6,7,8
1 = TMENU
1 {
noBlur = 1
expAll = 0
wrap = <ul>|</ul>
NO =1
NO.wrapItemAndSub = <li>|</li>
NO.ATagTitle.field = abstract // description // subtitle // title
ACT < .NO
ACTIFSUB < .NO
ACTIFSUB.allWrap = <li class="current">|</li>
ACTIFSUB.doNotLinkIt = 1
CUR < .NO
CUR.allWrap = <li class="current">|</li>
CUR.doNotLinkIt = 1
}
}
## MENU END
##SubMENU BEGIN
SUB_MENU = COA
SUB_MENU.1 = TEXT
SUB_MENU.1.value = text
SUB_MENU.1.data = leveltitle:1
SUB_MENU.1.wrap = <div class="menue_title">|</div>
SUB_MENU.2 = HMENU
SUB_MENU.2 {
special = directory
#special.value = 8
special.value.data = leveluid:1
entryLevel = 1
expAll = 1
1 = TMENU
1 {
noBlur = 1
expAll = 0
wrap = <ul>|</ul>
NO = 1
NO.wrapItemAndSub = <li>|</li>
NO.ATagTitle.field = abstract // description // subtitle // title
ACT < .NO
CUR < .NO
CUR.allWrap = <li class="current">|</li> | |
CUR.doNotLinkIt = 1
}
}
##SubMENU END
It's not tested - and I am not really into it.
yeah, it's working 😃
a huge thank zeroalpha for your help :]
german's reputation in regard of typo3 is not exagerated ^^
thanks again 😉