---
title: "Dynamic subpage-menu title"
url: "https://www.typo3.net/d/106593-dynamic-subpage-menu-title"
source: "typo3.net"
tags: ["TYPO3","Menüs","English","Frage"]
created: "2011-08-01"
last_reply: "2011-08-02"
replies: 6
solved: false
page: 1
pages: 1
lang: "en"
---

# Dynamic subpage-menu title

TYPO3 › Menüs · 6 Antworten · gestartet 2011-08-01

## Eröffnungsbeitrag

**matthieu_sib** · 2011-08-01 · [Beitrag #1](https://www.typo3.net/d/106593-dynamic-subpage-menu-title/1)

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 :

```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 ^^

## Antworten

### [#2](https://www.typo3.net/d/106593-dynamic-subpage-menu-title/2) · zeroalpha · 2011-08-01

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

```typoscript
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}
```

### [#3](https://www.typo3.net/d/106593-dynamic-subpage-menu-title/3) · matthieu_sib · 2011-08-01

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 ^^

### [#4](https://www.typo3.net/d/106593-dynamic-subpage-menu-title/4) · zeroalpha · 2011-08-02

You should post your new TS so we can help you find the mistake.

### [#5](https://www.typo3.net/d/106593-dynamic-subpage-menu-title/5) · matthieu_sib · 2011-08-02

hi there,

here is my ts of the menu

```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.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 :)

### [#6](https://www.typo3.net/d/106593-dynamic-subpage-menu-title/6) · zeroalpha · 2011-08-02

Maybe this could work...

```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 =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.

### [#7](https://www.typo3.net/d/106593-dynamic-subpage-menu-title/7) · matthieu_sib · 2011-08-02

yeah, it's working :D

a huge thank zeroalpha for your help :]

german's reputation in regard of typo3 is not exagerated ^^

thanks again ;)

---

Quelle: „Dynamic subpage-menu title“, typo3.net, https://www.typo3.net/d/106593-dynamic-subpage-menu-title
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
